Creates modified versions of the modules' .Rmd files, with YAML headers removed and adapted knitr setup chunks
Usage
prepManualRmds(
modulePath,
rebuildCache = FALSE,
ignoreModules = NULL,
bookdownYML = "_bookdown.yml",
stagingPath = "_manual_rmds"
)Arguments
- modulePath
modules' folder directory, specified exactly as in
_bookdown.yml. For instance, if in_bookdown.ymlthe list of module.Rmdfiles is provided as- modules/XXX.Rmd,- ~/modules/XXX.Rmd, or- ../X/modules/XXX.Rmd, thenmodulePathmust be eithermodules,~/modulesor../X/modulesrespectively. A/may be appended at the ofmodulePath(e.g.~/modules/). Note that all modules must be in the same directory.- rebuildCache
should cached chunks be re-executed?
- ignoreModules
character vector of modules to ignore.
- bookdownYML
path to the book's
_bookdown.yml, which supplies the chapter order used when de-duplicating text references across chapters. Read from the working directory by default. A chapter that is prepared but not listed here is reported: it would otherwise be absent from the book without the build failing.- stagingPath
directory the generated chapters are written to, relative to the book root. Nothing is written into the module directories: a failed build used to leave a
<module>2.Rmdin each one, dirtying every module checkout, and each module repository carried a.gitignoreline to hide it. List the chapters from here in_bookdown.yml, and add this directory to the book's.gitignore.