Convert a numeric variable in to a factor with four levels.
convert.to.factor(x)
x
a numeric vector
a factor variable
Tom Elliott
f <- convert.to.factor(runif(100, 0, 10)) levels(f)