update_reports: Compile reports within the factory

Description Usage Arguments Author(s)

View source: R/update_reports.R


This function is used to compile several reports stored in the factory, inside the report_sources folder (or any subfolder within). Outputs will be generated in a named and time-stamped directory within report_outputs. By default, only the most recent version of each report is compiled, but an option permits to compile all reports. Reports are expected to be rmarkdown documents (.Rmd extension), named using the following convention: [name]_[date].Rmd, where date must have the format yyy-mm-dd, for instance 2018-12-01 for the 1st December 2018; [name] should be any explicit name, without blank spaces or accentuated characters. For instance, bird_phylogeny_2017-04-01.Rmd or estimation_R_2018-02-04.Rmd are good file names.


update_reports(factory = getwd(), all = FALSE, quiet = TRUE,
  encoding = "UTF-8", ignore_archive = TRUE,
  clean_report_sources = FALSE, remove_cache = TRUE, ...)



the path to a report factory; defaults to the current working directory


a logical indicating if all reports should be compiled; it defaults to FALSE, in which case only the latest versions of each reports will be compuled.


a logical indicating if messages from rmarkdown compilation should be displayed; FALSE by default.


a character string indicating which encoding should be used when compiling the document; defaults to '"UTF-8"', which ensures that non-ascii characters work across different systems


when TRUE, any reports within an '_archive' sub-directory are ignored. Set to FALSE to list these reports.


a logical indicating if indesirable files and folders in the 'report_sources' folder should be cleaned before compilation; defaults to 'FALSE' (no cleanup)


a logical passed to 'clean_report_sources', indicating if the 'cache' folder should be considered as undesirable in 'report_sources'; defaults to 'TRUE', in which case 'cache' will also be removed if 'clean_report_sources' is 'TRUE'


further arguments passed to rmarkdown::render.


Thibaut Jombart [email protected]

reconhub/reportfactory documentation built on Nov. 24, 2019, 8:37 a.m.