[R] data.frame: return all rows where at least one...

Werner W. pensterfuzzer at yahoo.de
Fri Aug 6 15:03:20 CEST 2010


Hi,

I know ways to do this but they all seem awkward and I somehow believe that 
there is a convenient shortcut.

If I have a data.frame with many columns, how can I request all rows for which 
at least one column satisfy an expression? 

For instance, all rows where at least one column is negative.

Many thanks,
  Werner






More information about the R-help mailing list