[R] TRUE FALSE issue

Erik Iverson eriki at ccbr.umn.edu
Wed Aug 11 04:16:42 CEST 2010


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



More information about the R-help mailing list