Renders a parameterized R Markdown template into an HTML or PDF report for a trial.
Arguments
- trial
A pr_trial object.
- output_file
Character. Output file path.
- format
Character.
"html"(default) or"pdf".- template
Character.
"generic"(default),"saddle", or"foot".- masks
Named list of masks.
NULLuses the layout defaults.- thresholds
Optional reference threshold tibble.
Details
Source recordings and symbolic-link destinations are refused. Completed reports replace existing outputs with recovery on reported failures; process termination or concurrent writers are outside this guarantee.
Examples
# \donttest{
# Rendering needs 'rmarkdown' and a pandoc installation.
if (requireNamespace("rmarkdown", quietly = TRUE) &&
rmarkdown::pandoc_available()) {
tmp <- tempfile(fileext = ".html")
pr_export_report(pr_example_trial("insole"), tmp, template = "foot")
print(file.exists(tmp))
unlink(tmp)
}
#> [1] TRUE
# }