[R] omitting integer(0) rows from data frame

Carl Witthoft carl at witthoft.com
Wed Oct 30 20:18:39 CET 2013

Both PBurns and DWin are correct.  I just thought I'd add a clunky "safety
check" approach I use now and then:

Before doing the actual subset, i.e.   df[-which(something),]  ,  do
something like 

if (length(which(something)) <1 ) {skip the subsetting} else

View this message in context: http://r.789695.n4.nabble.com/omitting-integer-0-rows-from-data-frame-tp4679353p4679386.html
Sent from the R help mailing list archive at Nabble.com.

More information about the R-help mailing list