How about the following, if you really want characters or just leave as 
factor

i <- round(runif(10, 1, 4))
  years <- as.character(factor(i, labels = c("Freshman", "Sophomore", 
"Junior", "Senior")))

HTH,

ken

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to