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.

______________________________________________
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.

Reply via email to