tidai | R Documentation |
Replace a vector by named vector
tidai(x, y, fac = FALSE, keep_origin = FALSE)
x |
a vector need to be replaced |
y |
named vector |
fac |
consider the factor? |
keep_origin |
keep_origin? |
vector
tidai(c("a", "a", "b", "d"), c("a" = "red", b = "blue"))
tidai(c("a", "a", "b", "c"), c("red", "blue"))
tidai(c("A" = "a", "B" = "b"), c("a" = "red", b = "blue"))
tidai(factor(c("A" = "a", "B" = "b", "C" = "c")), c("a" = "red", b = "blue", c = "green"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.