powered by
Set Factor Class
to.factor(x) <- value
the data that you want to set
levels, the first value is the reference. If the length of value is 1, no levels will be given to x
factor x
# NOT RUN { to.factor(mtcars$gear) <- c(4,3,5) # }
Run the code above in your browser using DataLab