
Render standardized cancer registry reports from built-in templates
Source:R/create_report.R
create_report.RdThe create_report() function generates a report from objects with class of
canreg or canregs using pre-defined rmarkdown templates.
Usage
create_report(
data,
template = "annual",
title = "Cancer Registry Report",
output_format = "html_document",
output_dir = NULL,
...
)
# S3 method for class 'canregs'
create_report(
data,
template = "annual",
title = "Cancer Registry Report",
output_format = "html_document",
output_dir = NULL,
...
)
# S3 method for class 'canreg'
create_report(
data,
template = "annual",
title = "Cancer Registry Report",
output_format = "html_document",
output_dir = NULL,
...
)Arguments
- data
An object of class
canregorcanregs.- template
Character string specifying the report template to use. Options include
"annual","quality", or"quality-list-city". Default is"annual".- title
Character. Title of the generated report. Default is
"Cancer Registry Report".- output_format
Character. Format of the rendered report. Options are
"html_document","word_document", or"pdf_document". Default is"html_document".- output_dir
Character. Directory where the report will be saved.
- ...
Additional arguments passed to
rmarkdown::render().
Examples
if (FALSE) { # \dontrun{
data("canregs")
create_report(canregs, template = "quality", title = "QC Report")
} # }
if (FALSE) { # \dontrun{
create_report(canregs, template = "annual", title = "Annual Report")
} # }
if (FALSE) { # \dontrun{
data <- canregs[[1]]
create_report(data, template = "annual", title = "Annual Report")
} # }