[R] how to collapse categories or re-categorize variables?
Wu Gong
wg2f at mtmail.mtsu.edu
Fri Jul 16 19:41:11 CEST 2010
Do you want to replace specific values of a data set?
df <- sample(c(0,1,2),600,replace=T)
table(df)
df[df==2]<-1
table(df)
-----
A R learner.
--
View this message in context: http://r.789695.n4.nabble.com/how-to-collapse-categories-or-re-categorize-variables-tp2291704p2291727.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list