Build book from vignettes

build_book(
  path = "inst/report",
  path.v = "vignettes",
  output_format = c("bookdown::gitbook", "bookdown::pdf_document2"),
  clean_before = TRUE,
  clean_after = TRUE,
  keep_rmd = "index\\.Rmd$|zzz-references\\.Rmd$",
  clean = TRUE
)

Arguments

path

Path of the book

path.v

Path to vignettes folder to copy in the book folder

output_format

Output format of the book. "bookdown::gitbook", "bookdown::pdf_document2"

clean_before

Logical. Whether to remove all Rmd (except keep_rmd) before build

clean_after

Logical. Whether to remove all Rmd (except keep_rmd) after build

keep_rmd

Regex to list Rmd filenames to keep if clean_before or clean_after is TRUE. You'd better keep index.Rmd.

clean

Whether to delete the possible output files. If FALSE, simply print out a list of files/directories that should probably be deleted. You can set the global option bookdown.clean_book = TRUE to force this function to delete files. You are recommended to take a look at the list of files at least once before actually deleting them, i.e. run clean_book(FALSE) before clean_book(TRUE).