look_up | R Documentation |
Replace x values with corresponding values using a key
look_up(x, table, index = "var", column = 2)
x |
A string vector to be matched. |
table |
Lookup table |
index |
Character string of the key/index column used for matching |
column |
Column index (integer) or name (string) to return from the lookup table. Default is the second column. |
library(magrittr)
library(dplyr)
iris %>% .$Petal.Width %>%
look_up(tibble(var=0.2,return="zero-point-two"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.