View source: R/utils_vectors.R
| vlookup_from_ref | R Documentation |
Vlookup replace using a lookup column and reference table
vlookup_from_ref(base, lookup_col, lookup_ref, value_col)
base |
|
lookup_col |
|
lookup_ref |
|
value_col |
|
vector
Other vectors:
len_unique(),
names_values_switch(),
rle_df(),
rle_groups(),
rle_seq(),
sort_by_names(),
true_names(),
unify_vec_preserve_order(),
unique_with_names(),
vlookup(),
zchar_remove()
ref <- tibble::tibble(lookup = letters[1:5], value = 1:5)
original <- tibble::tibble(lookup = letters[1:20], base = runif(20, min = 6, max = 20))
dplyr::mutate(original, base = vlookup_from_ref(base, lookup, ref$lookup, ref$value))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.