replace_values | R Documentation |
Replace the values in a vector
replace_values(x, from, to, must_have=TRUE)
x |
vector |
from |
values to be changed |
to |
what values need to be changed to |
must_have |
logical. Give an error if a value in from is not in x |
vector
v <- LETTERS[1:5]
replace_values(v, c("A", "B", "C"), c("first", "abc", "third"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.