recode_age_education.Rd
Recode Age Education
If age exact is labelled to a number less than 10, coded to 15. Refused answers are coded to missing. Still studying answers are recoded to the exact age, when given, otherwise to missing.
recode_age_education(var, age_exact = NULL)
var | Age Education variable |
---|---|
age_exact | The exact age variable, defaults to |
Other recode functions:
recode_gender()
,
recode_mentioned()
#Exact age is given recode_age_education ( var = c( "2 years", "75 years", NA_real_, "Still studying", "Refusal", "No full-time education"), age_exact = c(87, 75, 34,23, 19, 45) )#> [1] 15 75 NA 23 NA 15#Exact age is not given, school living is recoded to missing recode_age_education ( var = c( "2 years", "75 years", NA_real_, "Still studying", "Refusal", "No full-time education") )#> Warning: NAs introduced by coercion#> Warning: NAs introduced by coercion#> [1] 15 75 NA NA NA 15