[R] Another simple q - removing negative values

Michael Hopkins michael.hopkins at hopkins-research.com
Fri Jul 15 13:59:36 CEST 2005


Sorry folks but again I have failed in my understanding of how to do a very
simple thing.  I've read the various texts and searched the help archives
but no positive result so far.

I want to remove all the rows in a data frame where one of the variables has
negative values.  In approx Stata pseudocode:

   drop _all, if( x < 0 )

Please either point me to relevant sections of the docs or supply me with
solution - I'm sure it's very simple.

Michael




More information about the R-help mailing list