Description Usage Arguments Value Examples
Sometimes we need to map one vector into another. For inhouse data it can be useful when defining categories for
carteras modelo, id's or emisoras. This function maps origin -> target
for every value of x.
1 | keymapping(x, origin, target, replace_missing = FALSE)
|
x |
The vector that will be transformed; x must have values in |
origin |
A vector |
target |
A vector of the same length as origin |
replace_missing |
Indicates whether the values of |
A transformed vector
1 2 | keymapping(1:6, c(2,3), c(-1, -2))
keymapping(1:6, c(2,3), c(-1, -2), replace_missing = NA)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.