relabel | R Documentation |
Reassigning values of categorical variable. It is used for generating legal value of categorical variable before applying dynamic slicing.
relabel(x)
x |
A vector of data values. |
An integer vector with values range from 0 to k (k > 0).
ds_test
.
n <- 10
x <- c(rep("G1", n), rep("G2", n))
x <- relabel(x)
x <- c(rep(4, n), rep(5, n), rep(NA, n))
x <- relabel(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.