R/create_report.R
create_report.Rd
The create_report()
function generates a report from objects with class of
canreg
or canregs
using pre-defined rmarkdown templates.
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,
...
)
An object of class canreg
or canregs
.
Character string specifying the report template to use.
Options include "annual"
, "quality"
, or "CI5"
. Default is "annual"
.
Character. Title of the generated report. Default is
"Cancer Registry Report"
.
Character. Format of the rendered report.
Options are "html_document"
, "word_document"
, or "pdf_document"
.
Default is "html_document"
.
Character. Directory where the report will be saved.
Additional arguments passed to rmarkdown::render()
.
No return value; generates a report as a side effect.
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")
} # }