num.recode | R Documentation |
Recodes the unique values of a variate using the value in position
i of the new.values
vector to replace the ith
sorted unique
values of x. The new levels do
not have to be unique.
num.recode(x, new.values)
x |
The |
new.values |
A |
A vector
.
Chris Brien
dae::fac.recast
.
## set up a factor with labels
x <- rep(c(-42, -14, 14, 42), 4)
## recode x
b <- num.recode(x, c(0, 28, 56, 84))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.