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.
Hi, On Thu, Feb 3, 2011 at 8:54 PM, Pete Brecknock <Peter.Brecknock at 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