On Aug 10, 2010, at 10:16 PM, Erik Iverson wrote:
On 08/10/2010 09:04 PM, Alexander Eggel wrote:
How can I extract the samples (S1-S5) containing a TRUE value in
their row?
Solution should apply to a much bigger data frame.
a
Samples A B C D . . .
1 S1 FALSE FALSE FALSE FALSE
2 S2 FALSE FALSE NA TRUE
3 S3 FALSE FALSE FALSE FALSE
4 S4 FALSE TRUE FALSE FALSE
5 S5 FALSE FALSE FALSE FALSE
.
Please give us *reproducible* examples as the posting guide requests.
See ?rowSums
Or
?any
?apply
David Winsemius, MD
West Hartford, CT
______________________________________________
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.