Creates a data frame of age-specific rates based on the class of
data (fbswicd
or canreg
).
create_age_rate(
x,
...,
event = "fbs",
cancer_type = "big",
format = "long",
mp = 1e+05,
decimal = 6,
show_pop = FALSE,
collapse = TRUE
)
# S3 method for class 'canreg'
create_age_rate(x, ..., cancer_type = "big")
# S3 method for class 'canregs'
create_age_rate(x, ..., cancer_type = "big", collapse = TRUE)
# S3 method for class 'fbswicds'
create_age_rate(
x,
...,
event = "fbs",
format = "long",
mp = 1e+05,
decimal = 6,
show_pop = FALSE,
collapse = TRUE
)
# S3 method for class 'fbswicd'
create_age_rate(
x,
...,
event = "fbs",
format = "long",
mp = 1e+05,
decimal = 6,
show_pop = FALSE
)
The input data, object with class of 'fbswicd'
, 'fbswicds'
,
'canreg'
, or 'canregs'
.
One or more variables used for stratification. For example, you
can stratify by sex
, year
, cancer
, or just by year
. If sex
is not passed as a parameter, the output will be the result for the
combined gender.
A variable used to specify the type of calculation, options are fbs or sws, fbs for cancer incidence, and sws for cancer mortality.
A character string specifying the classification method
used to categorize ICD-10 codes. This determines how ICD-10 codes are
classified. Options include "big"
(classify ICD-10 codes into 26
cancer categories), "small"
(classify ICD-10 codes into 59 cancer
categories, more specific categories), "system"
(classify ICD-10
codes into organ system), and "gco"
(classify ICD-10 code into
cancer categories same as classification published by the Global
Cancer Observatory). This parameter is only available when the
input data is a vector of ICD-10 codes, or object with class of
'canreg'
or 'canregs'
.
Format of the output data frame, either "long" or "wide".
A constant to multiply rates by (e.g. mp=1000 for rates per 1000).
This parameter specifies the number of decimal places to round the results. The default is 2, which means rates will be rounded to two decimal places.
Logical value whether output population or not.
Logical value whether output result as age_rate or age_rates.
A data frame of age-specific rates.