[R] Filter out some levels?

Christian Schulz ozric at web.de
Tue Feb 24 09:30:37 CET 2004

Hi ,

how is it possible t cut some levels from one factor to  subsetting  a 
data.frame on?

subdata <- subset(data, data$FACTOR="1" | 
data$FACTOR="BETA" | data$FACTOR="XY")

Maybe a modifcation here is better, but how?
mergex[mergex$PLZX %in% levels(mergex$PLZX) ,]

Many thanks and regards,

More information about the R-help mailing list