Render standardized cancer registry reports using built-in Quarto templates provided by the package.

cr_render(
  data,
  template = "report",
  title = "Cancer Registry Report",
  author = "Henan Cancer Center",
  registry = NULL,
  output_format = "qcreport-typst",
  ref_doc = "year-book.docx",
  output_dir = "outputs",
  subdir = NULL,
  execute_dir = NULL,
  timestamp = "%Y-%m-%d",
  quiet = TRUE,
  ...
)

# S3 method for class 'canregs'
cr_render(
  data,
  template = "report",
  title = "Cancer Registry Report",
  author = "Henan Cancer Center",
  registry = NULL,
  output_format = "qcreport-typst",
  ref_doc = "year-book.docx",
  output_dir = "outputs",
  subdir = NULL,
  execute_dir = NULL,
  timestamp = "%Y-%m-%d",
  quiet = TRUE,
  ...
)

# S3 method for class 'canreg'
cr_render(
  data,
  template = "report",
  title = "Cancer Registry Report",
  author = "Henan Cancer Center",
  registry = NULL,
  output_format = "qcreport-typst",
  ref_doc = "year-book.docx",
  output_dir = "outputs",
  subdir = NULL,
  execute_dir = NULL,
  timestamp = "%Y-%m-%d",
  quiet = TRUE,
  ...
)

Arguments

data

An object of class canreg or canregs.

template

Character. Report template to use.

title

Character. Title of the report. Default is "Cancer Registry Report".

author

Character. Author name to display in the report.

registry

Character. Name of the cancer registry (e.g., city or region).

output_format

Character. Output format for rendering. Supported formats include: "html", "docx", and "typst"

ref_doc

Character. Path to a Word reference document (DOCX) for customizing Word output styles.

output_dir

Character. Directory where the rendered report will be saved. Default is "outputs".

subdir

Optional. Name of a sub-directory within output_dir. If NULL, output is saved directly in output_dir.

execute_dir

The working directory in which to execute embedded code chunks.

timestamp

Character. Format string for the timestamp in the output directory name. Default is "%Y-%m-%d".

quiet

Logical. If TRUE, suppresses messages during rendering.

...

Additional arguments passed to quarto::quarto_render().

Value

Invisibly returns the path to the rendered report file.