knit field
in YAML). The preview_chapter() function is a wrapper of
render_book(preview = TRUE).render_book(input, output_format = NULL, ..., clean = TRUE, envir = parent.frame(),
clean_envir = !interactive(), output_dir = NULL, new_session = NA, preview = FALSE,
encoding = "UTF-8")preview_chapter(..., envir = parent.frame())
preview =
TRUE, only files specified in this argument are rendered, otherwise all R
Markdown files specified by the book are rendered.rmarkdown::render(). For preview_chapter(),
... is passed to render_book().envir before
rendering the book. By default, the environment is cleaned when rendering
the book in a non-interactive R session.NULL, a field named
output_dir in the configuration file _bookdown.yml will be
used (possiblely not specified, either, in which case a directory name
_book will be used).new_session option in
_bookdown.yml is used; if this is also not provided,
new_session = FALSE).input argument. Previewing a certain chapter may save compilation
time as you actively work on this chapter, but the output may not be
accurate (e.g. cross-references to other chapters will not work).new_session = FALSE) is to merge Rmd files into a single file and
render this file. You can also choose to render each individual Rmd file in a
new R session (new_session = TRUE).