When you have a data X with a class factor, you can transform it to numeric as y<-as.numeric(X) to transform it to a factor again use y<-as.factor(X) -- View this message in context: http://www.nabble.com/How-to-change-the-class-of-data--tp17793351p17793713.html Sent from the R help mailing list archive at Nabble.com.