Re: [R] problem subsetting a data frame

2011-02-03 Thread Pete Brecknock

try

subset(D, D$x  5|D$y  5)

HTH

Pete

-- 
View this message in context: 
http://r.789695.n4.nabble.com/problem-subsetting-a-data-frame-tp3258981p3259360.html
Sent from the R help mailing list archive at Nabble.com.

__
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.


Re: [R] problem subsetting a data frame

2011-02-03 Thread Steve Lianoglou
Hi,

On Thu, Feb 3, 2011 at 8:54 PM, Pete Brecknock peter.breckn...@bp.com wrote:

 try

 subset(D, D$x  5|D$y  5)

Or even better:

R subset(D, x  5 | y  5)

(The column names of D are in scope as variables within the call to
subset(D, ...)

-steve

-- 
Steve Lianoglou
Graduate Student: Computational Systems Biology
 | Memorial Sloan-Kettering Cancer Center
 | Weill Medical College of Cornell University
Contact Info: http://cbio.mskcc.org/~lianos/contact

__
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.