On 08/09/2010 01:16 AM, Alexander Eggel wrote:
Using R, I would like to find out which Samples (S1, S2, S3, S4, S5) fulfill
the following criteria:contain minimally one value (x, y or z) bigger than
4. Any ideas? Thanks, Alex.
data
Sample x y z
1 S1 -0.3 5.3 2.5
2 S2 0.4 0.2 -1.2
3 S3 1.2 -0.6 3.2
4 S4 4.3 0.7 5.7
5 S5 2.4 4.3 2.3
Untested:
Sample[apply(Sample[-1], 1, function(x) any(x) > 4)), "Sample"]
______________________________________________
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.