[R] REmove level with zero observations
GL
pflugg at shands.ufl.edu
Wed Aug 4 03:33:14 CEST 2010
Ended up working as follows:
dbs3.train.sans.influential.obs <-
drop.levels(dbs3.train.sans.influential.obs)
drop.list <- NULL
for (i in 4:ncol(dbs3.train.sans.influential.obs)) {
if (nlevels(dbs3.train.sans.influential.obs[,i]) < 2) {drop.list <-
cbind(drop.list,i)}}
dbs3.train.sans.influential.obs <-
dbs3.train.sans.influential.obs[-c(drop.list)]
--
View this message in context: http://r.789695.n4.nabble.com/REmove-level-with-zero-observations-tp2312553p2312821.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list