Hi, If I have a dataset called "data" with a factor called "Species" that has three levels "Sp1", "Sp2", and "Sp3". Is there a way to name an object after a specific level? I have tried the code below and get the error "error in paste(levels(data$Species)[1]) <- 1:10 could not find function "paste<-"
Code: paste(levels(data$Species)[1])<-1:10 Thanks for your help. James -- View this message in context: http://www.nabble.com/Level-name-as-object-name-tp25708252p25708252.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.