compile_reports: Compile an R Markdown report

Description Usage Arguments

View source: R/compile_reports.R

Description

Compile an R Markdown report

Usage

1
2
3
4
5
6
7
8
9
compile_reports(
  factory = ".",
  reports = NULL,
  params = NULL,
  quiet = TRUE,
  subfolder = NULL,
  timestamp = format(Sys.time(), "%Y-%m-%d_T%H-%M-%S"),
  ...
)

Arguments

factory

The path to the report factory or a folder within the desired factory. Defaults to the current directory.

reports

Either a regular expression (passed directly to grep()) that matches to the report paths you would like to compile or an integer/logical vector. If reports is an integer or character vector then a call of compile_reports(factory, reports = idx) is equivalent to compile_reports(factory, list_reports(factory)[idx]).

params

A named list of parameters to be fed to each report that matches the regular expression. If a report has default parameters set in it's yaml heading and their are duplicates then preference is given to the value supplied here.

quiet

A logical indicating if messages from R Markdown compilation should be displayed; TRUE by default.

subfolder

Name of subfolder to store results. Not required but helps distinguish output if mapping over multiple parameters.

timestamp

timevalue used in the folder structure of the report output. If NULL, format(Sys.time(), "%Y-%m-%d_T%H-%M-%S") will be used and it's evaluation forced immediately.

...

further arguments passed to rmarkdown::render()


tjtnew/reportfactory documentation built on Dec. 31, 2020, 8:40 a.m.