Convert a numeric variable in to a factor with four levels.
convert.to.factor(x)
a numeric vector
a factor variable
# NOT RUN { f <- convert.to.factor(runif(100, 0, 10)) levels(f) # }
Run the code above in your browser using DataLab