| data_population_file {Rcan} | R Documentation | 
Population data example
Description
Population data example for the function csu_merge_cases_pop.
Usage
data("data_population_file")Format
A data frame with 160 observations on the following 4 variables.
- year
- year 
- sex
- sex 
- age_group
- 5 year age group 
- pop
- Count of population year 
Details
This dataset provide an example to merge 5 years age grouped data with population data using the function csu_merge_cases_pop
See Also
Examples
data(ICD_group_GLOBOCAN)
data(data_individual_file)
data(data_population_file)
#group individual data by 
# 5 year age group 
# ICD grouping from dataframe ICD_group_GLOBOCAN
# year (extract from date of incidence)
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")     
#Merge 5-years age grouped data with population by year (automatic) and sex
df_pop <- csu_merge_cases_pop(df_data_year, data_population_file, var_age = "age_group", 
                           var_cases = "cases", var_py = "pop", group_by = c("sex"))
[Package Rcan version 1.3.82 Index]