Description Usage Arguments Value Examples
Replace/rename values in a vector
1 | replaceval(x, ..., defaultValue = x)
|
x |
Vector of values to replace |
... |
Key/value pairs in the form |
defaultValue |
A vector of values to use as the default should the value not
be found in |
A vector with values replaced
1 2 3 4 | x <- c("fish", "fish", "fish", "whistle")
replaceval(x, fish="newfish")
replaceval(x, whistle="newwhistle")
replaceval(x, fish="newfish", defaultValue="not a fish")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.