lookupTable: Use a lookup table to match values

View source: R/lookupTable.R

lookupTableR Documentation

Use a lookup table to match values

Description

Use a lookup table to match values

Usage

lookupTable(x, y, old, new)

Arguments

x

vector of original values

y

dataframe lookup table

old

column name string of original values

new

column name string of new values

Value

vector of updated values

Examples

x <- c("A", "B", "B", "C", "A")
lookup <- data.frame(old = c("A", "B", "C", "D"), new = c(1, 2, 3, 4))
lookupTable(x, lookup, "old", "new")


johngodlee/JLGMisc documentation built on June 29, 2024, 9:15 p.m.