-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathmakeFile.R
More file actions
17 lines (15 loc) · 738 Bytes
/
makeFile.R
File metadata and controls
17 lines (15 loc) · 738 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
rm(list=ls())
bookdown::clean_book()
file.remove('Rcourse.Rmd')
bookdown::render_book("index.Rmd","bookdown::pdf_book", output_dir = 'docs', clean_envir = TRUE) # render to HTML
bookdown::render_book("index.Rmd","bookdown::gitbook", output_dir = 'docs')
bookdown::render_book("index.Rmd","bookdown::word_document2", clean_envir = TRUE, output_dir = 'docs')
files <- list.files(pattern = '.Rmd')
file.remove('Rcourse.Rmd')
for(i in 9:length(files)){
# bookdown::preview_chapter(files[i],"bookdown::pdf_book" )
bookdown::preview_chapter(files[i],"bookdown::gitbook" )
readline(prompt="Press [enter] to continue")
}
bookdown::preview_chapter(files[15],"bookdown::pdf_book" )
bookdown::preview_chapter(files[22],"bookdown::gitbook" )