> The problem is in data.frame[ and any NA in a logical vector will return a > row of NA's. This can be avoid by wrapping which() around the logical vector > which seems entirely wasteful or using subset().
The basic philosophy that causes this behaviour is sensible in my opinion: missing values must always be handled explicitly. Sure it's a bit of a hassle, but it being explicit prevents you from making major errors in an analysis. In my opinion, the flaw is that R doesn't apply this philosophy entirely consistently: I think factor and table should default to exclude = NULL. Hadley -- Assistant Professor / Dobelman Family Junior Chair Department of Statistics / Rice University http://had.co.nz/ ______________________________________________ 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.