Description Usage Arguments Value Examples
View source: R/data_manipulation.R
Recategorize a character or numerical vector.
1 | recategorize(x, x.new, labels = NA)
|
x |
a character or numerical vector. |
x.new |
a character/numerical vector of the new values for |
a character or numerical vector is recategorized.
1 2 3 | recategorize(c(1,2,5,3,4), c("1" = 1, "2" = 1, "3" = 0))
recategorize(c(1,2,3), cbind(c(1,2,3), c(1,1,0), c(1,-1,0)))
recategorize(c(1,4,2,5,3,NA), data.frame(c(1,2,3), c(1,1,0), c(1, -1, 0)) )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.