lookupTable | R Documentation |
Use a lookup table to match values
lookupTable(x, y, old, new)
x |
vector of original values |
y |
dataframe lookup table |
old |
column name string of original values |
new |
column name string of new values |
vector of updated values
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.