[R] TRUE FALSE issue

David Winsemius dwinsemius at comcast.net
Wed Aug 11 04:20:30 CEST 2010


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



More information about the R-help mailing list