Running examples in ‘Rcan-Ex.R’ failed
The error most likely occurred in:

> ### Name: Rcan-package
> ### Title: Cancer Registry Data Analysis and Visualisation
> ### Aliases: Rcan-package Rcan
> ### Keywords: package
> 
> ### ** Examples
> 
> 
> 
> data(ICD_group_GLOBOCAN)
> data(data_individual_file)
> 
> 
> #group individual data by 
> #	5 year age group 
> #	ICD grouping from dataframe ICD_group_GLOBOCAN
> df_data_year <- csu_group_cases(data_individual_file,
+   var_age="age",
+   group_by=c("sex", "regcode", "reglabel"),
+   df_ICD = ICD_group_GLOBOCAN,
+   var_ICD  ="site",
+   var_year = "doi")     
Warning in csu_group_cases(data_individual_file, var_age = "age", group_by = c("sex",  :
  Warning:
60 cases have age value > 150 and will be considered as unknown age

> 
> head(df_data_year)
  sex regcode   reglabel year ICD_group age_group            LABEL
1   1 REGSTEA registry A 2008    C00-08         1 Lip, oral cavity
2   1 REGSTEA registry A 2008    C00-08         2 Lip, oral cavity
3   1 REGSTEA registry A 2008    C00-08         3 Lip, oral cavity
4   1 REGSTEA registry A 2008    C00-08         4 Lip, oral cavity
5   1 REGSTEA registry A 2008    C00-08         5 Lip, oral cavity
6   1 REGSTEA registry A 2008    C00-08         6 Lip, oral cavity
  age_group_label cases
1           00-04     0
2           05-09     0
3           10-14     0
4           15-19     0
5           20-24     0
6           25-29     0
> # individual cases grouped by ICD and 5 years age group and year.
> readline(prompt="Press [enter] to continue to merge cases and population)")	
Press [enter] to continue to merge cases and population)
[1] ""
> 
> 
> data(data_population_file)	
> 
> df_data <- csu_merge_cases_pop(
+ 	df_data_year, 
+ 	data_population_file, 
+ 	var_age = "age_group",
+ 	var_cases = "cases",
+ 	var_py = "pop",
+ 	group_by = c("sex"))
> 
> head(df_data)
  sex age_group year regcode   reglabel
1   1         1 2008 REGSTEA registry A
2   1         1 2008 REGSTEA registry A
3   1         1 2008 REGSTEA registry A
4   1         1 2008 REGSTEA registry A
5   1         1 2008 REGSTEA registry A
6   1         1 2008 REGSTEA registry A
                                                      ICD_group
1                                                        C00-08
2                                                 C09-10,C12-14
3                                                           C11
4                                                           C15
5                                                           C16
6 C17,C26-31,C35-42,C47-49,C55,C57-60,C63,C68-69,C74-80,C87,C89
             LABEL age_group_label cases   pop
1 Lip, oral cavity           00-04     0 72051
2    Other pharynx           00-04     0 72051
3      Nasopharynx           00-04     0 72051
4       Oesophagus           00-04     0 72051
5          Stomach           00-04     0 72051
6            Other           00-04    12 72051
> #Merge 5-years age grouped data with population by year (automatic) and sex
> readline(prompt="Press [enter] to continue to merge cases and population)")	
Press [enter] to continue to merge cases and population)
[1] ""
> 
> 
> data(csu_registry_data_2)
> 				  
> # ASR with standard error with missing age.
> df_asr <- csu_asr(csu_registry_data_2, 
+                   "age", "cases", "py",
+                   group_by = c("registry", "registry_label", "sex", "year", "ethnic" ),
+                   var_age_group = c("registry_label"), 
+                   var_st_err = "st_err")
Error in gmax(age_factor) : max is not meaningful for factors.
Calls: csu_asr ... is.data.table -> [ -> [.data.table -> gforce -> gmax
Execution halted