[R] TRUE FALSE issue

2010-08-10 Thread Alexander Eggel
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 . . .

Re: [R] TRUE FALSE issue

2010-08-10 Thread Erik Iverson
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

Re: [R] TRUE FALSE issue

2010-08-10 Thread David Winsemius
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

Re: [R] TRUE FALSE issue

2010-08-10 Thread Bill.Venables
with(a, Samples[apply(a[,-1], 1, any)]) [1] S2 S4 Levels: S1 S2 S3 S4 S5 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Alexander Eggel Sent: Wednesday, 11 August 2010 12:05 PM To: r-help@r-project.org Subject: [R] TRUE FALSE

Re: [R] TRUE FALSE issue

2010-08-10 Thread Bill.Venables
2010 12:21 PM To: egg...@gmx.net; r-help@r-project.org Subject: [ExternalEmail] Re: [R] TRUE FALSE issue with(a, Samples[apply(a[,-1], 1, any)]) [1] S2 S4 Levels: S1 S2 S3 S4 S5 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf