Skip to contents

Clean canreg data.

Usage

clean_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

Data of class 'canreg'.

cutage_method

Method for grouping ages. Options are 'distance', 'interval', or 'quarter'. Default is 'distance'.

smooth_age

Method for expanding age. Options are 'linear','natural', or 'periodic'. Default is 'natural'.

breaks

Cut points for age groups when 'cutage_method' is 'interval'. Default is 'c(0, 15, 40, 65)'.

length

Length of each age group when 'cutage_method' is 'distance'. Default is 5.

maxage

Start age of the last age groups. Default is 85.

sep_zero

Logical value TRUE or FALSE, if the 0-year age group treated as a separate group. Default is TRUE.

labels

Labels for the age groups.

label_tail

Tail of the labels.

type

Specify the grouping method for tumors. Options are 'system', 'big', or 'small'. Default is 'big'.

lang

Specify the language for the output. Options are 'en' or 'cn'. Default is 'cn'.

Value

Class 'canreg'.