Create variable for groups of malignant neoplasms considered to be histologically 'different' for the purpose of defining multiple tumors, ICD-O-3

histgroup_iarc(df, hist_var, new_var_hist = t_histgroupiarc, version = "3.1")

Arguments

df

dataframe in long or wide format

hist_var

variable in df that contains first 4 digits of tumor histology (without behavior)

new_var_hist

Name of the newly calculated variable for histology groups. Default is t_histgroupiarc.

version

Version of ICD-O-3 classification used. Can be either "3.0" for 2000 publication, "3.1" for 2013 first revision or "3.2" for 2019 second revision. Default is version = "3.1" for ICD-O-3 revision 1, released 2013.

Value

df

Examples

#load sample data
data("us_second_cancer")

us_second_cancer %>% 
   msSPChelpR::histgroup_iarc(., hist_var = t_hist) %>%
   dplyr::select(fake_id, t_hist, t_histgroupiarc) 
#> # A tidytable: 113,999 × 3
#>    fake_id t_hist t_histgroupiarc                 
#>    <chr>    <int> <fct>                           
#>  1 100004    8619 Other specific carcinomas       
#>  2 100004    8450 Adenocarcinomas                 
#>  3 100004    8549 Adenocarcinomas                 
#>  4 100004    9592 NA                              
#>  5 100034    9836 B-cell neoplasms                
#>  6 100037    9276 Other specified types of cancer 
#>  7 100038    8491 Adenocarcinomas                 
#>  8 100038    8836 Sarcomas and soft tissue tumours
#>  9 100039    9377 NA                              
#> 10 100039    9697 B-cell neoplasms                
#> # ℹ 113,989 more rows