data_population_file: Population data example

Description Usage Format Details See Also Examples

Description

Population data example for the function csu_merge_cases_pop.

Usage

1
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

csu_merge_cases_pop

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
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"))

Rcan documentation built on July 1, 2020, 10:20 p.m.