Description Usage Arguments Value Examples
Replace values in a vector by matching values in a lookup vector. This function is similar to plyr::mapvalues.
1 | map_values(.x, .from, .to, .verbose = TRUE)
|
.x |
Vector to modify. |
.from |
Vector of values that should be replaced in |
.to |
Vector of new replacement values. |
.verbose |
Logical scalar. |
A vector.
1 2 3 4 | .x = c("Plebejus optilete", "Aglais io", "Plebejus optilete")
.from = c("Plebejus optilete", "Argynnis aglaja")
.to = c("Agriades optilete", "Speyeria aglaja")
map_values(.x, .from, .to)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.