recode_var: Recode values with a given mapping

View source: R/survey.r

recode_varR Documentation

Recode values with a given mapping

Description

Recode values with a given mapping

Usage

recode_var(x, mapping, translate = FALSE, check_mapping = FALSE)

Arguments

x

value to recode

mapping

list of mapping db value to label, label as name and db value as value

translate

if TRUE translate labels with i18n

check_mapping

if TRUE check if mapping is complete (if code in data are not mapped), NULL=apply default value in options

Value

factor vector of recoded values


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