survey_recode: Recode data from the DB storage code to the R labels (or to...

View source: R/survey.r

survey_recodeR Documentation

Recode data from the DB storage code to the R labels (or to its translaction into default language)

Description

This function recode from database values to labels (more meaningful). The recoding mapping for each variable is defined platform_define_survey usually in the platform file

Usage

survey_recode(x, variable, survey, translate = F, question = NULL)

Arguments

x

values to recodes

variable

name of the question variable name to use for recoding

survey

name of the survey

translate

if TRUE, try to translate the labels (using i18n function @seealso i18n)

question

old parameter name for variable, for compatibility

Value

vector of recoded value in factor

See Also

Other survey: SurveyLabeller, survey_aliases(), survey_definition(), survey_labeller(), survey_labels(), survey_recodings(), survey_rename_columns(), survey_variable_recoding(), survey_variables_like()


cturbelin/ifnBase documentation built on Nov. 5, 2023, 12:54 p.m.