[R] filtering data frame on multiple columns

Jim Holtman jholtman at gmail.com
Tue Mar 22 10:54:24 CET 2011


subset(filtEXP,max > 6 | FC > 4)

Sent from my iPad

On Mar 22, 2011, at 5:27, "Dry, Jonathan R" <Jonathan.Dry at astrazeneca.com> wrote:

> Hello
> 
> 
> 
> I want to filter a data frame called 'filtEXP' for rows where column
> 'max' > 6 OR column 'FC' > 4 and am trying various permutations of the
> below to no avail:
> 
> 
> 
> filtEXP2 <- filtEXP[filtEXP$max > 6,] || filtEXP[filtEXP$FC > 4,]
> 
> 
> 
> Any ideas?
> 
> 
> 
> 
> --------------------------------------------------------------------------
> AstraZeneca UK Limited is a company incorporated in Engl...{{dropped:23}}
> 
> ______________________________________________
> R-help at 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.



More information about the R-help mailing list