Compile the stock assessment document(s) for a given species where the number of documents depends on the number of directories that you pass to dir. Typically, this happens in the directory called doc that stores a single directory for each stock. bookdown::render_book will be called inside on each directory in dir.

compile(dir = file.path("doc", get_groups(info_groups)))

Arguments

dir

A vector of file paths pointing to directories that contain draft files, i.e., alphabetized .Rmd files to write the stock assessment(s). It is fine to just pass a single directory. The terminal directory of each value in dir is used to name the output files. For example if you pass dir = 'doc/North', then the pdf will be named _North.pdf. The underscore is used to move the pdf, or whatever type of output you are using, to the top of the stack for easier searching.

Details

status: This function is currently in beta testing, which means that it

  • might be helpful,

  • could contain bugs,

  • will more than likely have non-descript error and warning messages. Please post an issue or email the author of this function. Thank you for helping test it out, and we hope the pain is worth the gain!

index.Rmd When specifying a directory to bookdown::render_book, the file index.Rmd is normally used as the master file for rendering the book and all other files are brought in as chapters in alphabetical order. Here, in the sa4ss package we use 00a.Rmd as the indexing file and all other .Rmd files are sourced in alphabetical order. The renaming is done automatically for you in the call to draft and just mentioned here for completeness.

See also

See compile_internal for the non-vectorized version of what happens inside each directory.

Other compile: compile_changebookname(), compile_internal()

Author

Kelli F. Johnson and undergoing testing by Kelli F. Johnson

Examples

if (FALSE) { # \dontrun{
# An example for lingcod in 2021, where there are some internal function
# that help make this easier for finding the directories that won't be
# available in your environment but that is okay. Just remove the call
# to get_groups() and add a vector of directories inside of doc that
# store model files.
compile(dir = file.path("doc", get_groups(info_groups)))
} # }