Count the canreg data.
count_canreg.canreg.Rd
Count the canreg data.
Usage
# S3 method for canreg
count_canreg(
x,
cutage_method = "distance",
smooth_age = "natural",
breaks = c(0, 15, 40, 65),
length = 5,
maxage = 85,
sep_zero = TRUE,
labels = NULL,
label_tail = NULL,
type = "big",
lang = "cn"
)
Arguments
- x
Object data of class 'canreg'.
- cutage_method
Methods for Specifying Age Groups. Options are "interval", "distance", or "quantile". Default is "distance".
- smooth_age
Methods for expanding age groups from 5 years to 1 year.
- breaks
Specicify the break points classify age groups when cutage_method is 'interval'. Default is 'c(0, 15, 40, 65)'.
- length
Specify the length of each age group when cutage_method is 'distance'. Default is 5.
- maxage
Specify the max age of age group when cutage_method is 'distance'. Default is 85.
- sep_zero
Logical value, TRUE or FALSE, specifying whether to treat age 0 as a separate group. Default is TRUE.
- labels
Labels for age groups. Default is NULL.
- label_tail
Tail label to be added to the labels. Default is NULL.
- type
Method for classify cancer sites.
- lang
Character value for specify the language used. options are 'cn' for Chinese, or 'en' for English.
Examples
library(canregtools)
file <- system.file("extdata", "411721.xls", package = "canregtools")
data <- read_canreg(file)
#> 2200 cases were read from FB sheet.1470 cases were read from SW sheet.
fbsw <- count_canreg(data, cutage_method = "interval")
fbsw
#> $areacode
#> [1] "411721"
#>
#> $county
#> [1] ""
#>
#> $area_type
#> [1] 农村
#> Levels: 城市 农村
#>
#> $location
#> [1] ""
#>
#> $year
#> [1] 2016
#>
#> $fbswicd
#> # A tibble: 208 × 12
#> year sex agegrp icd_cat fbs sws mv ub sub m8000 dco rks
#> <dbl> <fct> <fct> <fct> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 2016 男性 0-14 岁 口腔 0 0 0 0 0 0 0 80846
#> 2 2016 男性 15-39 岁 口腔 1 0 1 0 1 0 0 180929
#> 3 2016 男性 40-64 岁 口腔 5 2 5 0 3 0 0 155155
#> 4 2016 男性 65+ 岁 口腔 7 8 7 0 3 0 0 38723
#> 5 2016 男性 0-14 岁 鼻咽 0 0 0 0 0 0 0 80846
#> 6 2016 男性 15-39 岁 鼻咽 2 0 2 0 2 0 0 180929
#> 7 2016 男性 40-64 岁 鼻咽 2 6 2 0 2 0 0 155155
#> 8 2016 男性 65+ 岁 鼻咽 3 1 3 0 3 0 0 38723
#> 9 2016 男性 0-14 岁 食管 0 0 0 0 0 0 0 80846
#> 10 2016 男性 15-39 岁 食管 1 0 1 0 0 0 0 180929
#> # ℹ 198 more rows
#>
#> $pop
#> # A tibble: 8 × 4
#> year sex agegrp rks
#> <int> <fct> <fct> <int>
#> 1 2016 男性 0-14 岁 80846
#> 2 2016 男性 15-39 岁 180929
#> 3 2016 男性 40-64 岁 155155
#> 4 2016 男性 65+ 岁 38723
#> 5 2016 女性 0-14 岁 70475
#> 6 2016 女性 15-39 岁 165617
#> 7 2016 女性 40-64 岁 144124
#> 8 2016 女性 65+ 岁 46148
#>
#> attr(,"class")
#> [1] "fbswicd" "list"