Recode age type of cause-of-death data based on CoDEdit rules
Source:R/cod_recode_age_type.R
cod_recode_age_type.Rd
Recode age type of cause-of-death data based on CoDEdit rules
Usage
cod_recode_age_type(age_type, age_type_code = c("D", "M", "Y"))
Arguments
- age_type
A vector of values for age type based on the CoDEdit rules. This should either be "D" for age in days, "M" for age in months, or "Y" for age in years. If values are different from these, then
age_type_code
should be specified to correspond to the day, month, and year values ofage_type
.- age_type_code
A character or integer vector of 3 values that indicate which values are to be considered pertaining to days (first value in the vector), to months (second value in the vector), or years (third value in the vector).