Moves a rendered report from the report/ directory to the
results/reports/ directory and renames it to include the current date and
project version. This function is typically used after rendering a report
with run_report(), to save a copy of the rendered output.
Usage
archive_report(
file = NULL,
overwrite = FALSE,
quiet = getOption("lbstproj.quiet", FALSE)
)Arguments
- file
Character or
NULL. The name of the report file to archive. IfNULL, the most recently modified rendered report inreport/is used.- overwrite
Logical. Indicate whether to overwrite an existing archive file.
Default:
FALSE, an error is raised if the archive file already exists.- quiet
Logical. If
TRUE, suppress informational messages. Important messages (e.g. directory creation or errors) are still shown.Default:
FALSEunless the global optionlbstproj.quietis set otherwise.
Examples
if(FALSE) {
run_report(file = "html_report_2026_03_16.qmd")
archive_report()
archive_report(file = "html_report_2026_03_16.html", overwrite = TRUE)
}
