util_recode: Map a vector of values based on an assignment table

View source: R/util_recode.R

util_recodeR Documentation

Map a vector of values based on an assignment table

Description

Map a vector of values based on an assignment table

Usage

util_recode(values, mapping_table, from, to, default = NULL)

Arguments

values

vector the vector

mapping_table

data.frame a table with the mapping table

from

character the name of the column with the "old values"

to

character the name of the column with the "new values"

default

character either one character or on character per value, being used, if an entry from values is not in the from column in 'mapping_table

Value

the mapped values

See Also

dplyr::recode

Other mapping: util_map_all(), util_map_by_largest_prefix(), util_map_labels()


dataquieR documentation built on May 29, 2024, 7:18 a.m.