R/canreg_report.R
create_canreg_report_data.Rdcreate_canreg_report_data() builds a compact report-ready object from
canregs or fbswicds data. The object stores summary-level indicators
for the province/all areas, urban areas, and rural areas, as well as
registry-level indicators for individual registries.
create_canreg_report_data(
data,
year,
province = NULL,
province_en = NULL,
population_total = NULL,
summary_codes = c(all = "410000", urban = "910000", rural = "920000"),
cancer_codes = c(101:110, 112, 114:118, 120:125),
cancer_total_code = 60,
cancer_type = "big",
keep_source = TRUE,
include_age_registry = TRUE
)An object of class canregs or fbswicds.
Data year stored as metadata. The statistical calculations still
use the year column in the input data as a grouping variable.
Province names stored as metadata.
Optional total provincial population stored as metadata.
Named character vector identifying the summary groups.
Defaults to c(all = "410000", urban = "910000", rural = "920000").
Cancer codes to store as metadata for report generation.
Code for all malignant cancers. Defaults to 60.
Cancer classification type passed to count_canreg() when
data is a canregs object.
Logical. If TRUE, keep intermediate fbswicd objects in
source.
Logical. If TRUE, calculate registry-level
age-specific incidence and mortality rates.
An object of class canreg_report.