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


dataquieR documentation built on July 26, 2023, 6:10 p.m.