#' Render reports #' #' @param path_reports [character] path for the reports #' @param path_report [character] report path #' @param reports [character] subfolders containing each report #' @param path_publish [character] rendering output path #' @param output_format output format, see [bookdown::render_book]. Only #' `"bookdown::gitbook"` and `"bookdown::pdf_book"` are currently handled #' @param clean_cache [logical] clean Rmarkdown cache files #' @param ... Parameters passed to [render_report] and [bookdown::render_book] #' #' @return `NULL`, this function is used for side effect. #' @export #' @rdname render_reports #' #' @examples render_reports <- function(path_reports = "./reports", reports = list.files(path_reports, pattern = "^[0-9]{2}-.*$"), path_publish = "./public/reports", ...) { options(knitr.duplicate.label = 'allow') message("output_format=", output_format) message("folder list:") invisible(sapply(files, message)) for(file in files){ message("*******************************************************************") message("** RENDER ", file) message("*******************************************************************") path <- file.path(path_reports, file) render_report() } NULL }