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