[R] Another simple q - removing negative values

From: Michael Hopkins <michael.hopkins_at_hopkins-research.com>
Date: Fri 15 Jul 2005 - 21:59:36 EST

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



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri Jul 15 22:06:00 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:33:45 EST