search for: prunelevels

Displaying 1 result from an estimated 1 matches for "prunelevels".

2003 Jun 27
3
dropping factor levels in subset
Dear all, I've taken a subset of data from a data frame using crb<-subset(all.raw, creek %in% c("CR") & year %in% c(2000,2001) & substrate %in% ("b")) this works fine, except that all of the original factor levels are maintained. This results in NA's for these empty levels when I try to do summaries based on factors using by(). Is there a simple way to drop