Re: [R] TRUE/FALSE

2012-07-18 Thread Jim Lemon
On 07/17/2012 11:55 PM, cm wrote: Any reason I'd get an error like this? Error in if (round(pos[o + 1]) == (pos[o + 1] - 0.4)) { : missing value where TRUE/FALSE needed but when i do it individually, out of the for loop, (round(pos[o+1])==(pos[o+1]-.4) ) 65 TRUE Elementary, my dear cm.

Re: [R] TRUE/FALSE

2012-07-17 Thread Sarah Goslee
What's pos? What's o? What is your loop looping over? Where's your reproducible example provided using dput()? And more generally, have you read R FAQ 7.31 and the posting guide? Most likely either o is wrong, or there are NA values in pos, but we have no way to diagnose that. Sarah On Tue, Jul

[R] TRUE/FALSE

2012-07-17 Thread cm
Any reason I'd get an error like this? Error in if (round(pos[o + 1]) == (pos[o + 1] - 0.4)) { : missing value where TRUE/FALSE needed but when i do it individually, out of the for loop, > (round(pos[o+1])==(pos[o+1]-.4) ) 65 TRUE -- View this message in context: http://r.789695.n4.na

Re: [R] TRUE FALSE issue

2010-08-10 Thread Bill.Venables
ay, 11 August 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

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 FA

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 F

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 TR

[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

2010-08-09 Thread jim holtman
most likely 'combos[e,f]' is NA; take a look at your data. Also put options(error=utils::recover) in your program so that when the error occurs you can learn to use the debugging mode to trace down the problem. On Mon, Aug 9, 2010 at 11:38 AM, Turn & Fall wrote: > > Here is my code > >        

[R] TRUE/FALSE

2010-08-09 Thread Turn & Fall
Here is my code # determine the DDOA measurements for(e in 1:numSensors) { for(f in 1:numSensors) { if((combos[e,f]==1) {

Re: [R] TRUE/FALSE

2010-08-09 Thread Wu Gong
Hi Uwe, I'm sorry for the inconvenience I caused. I read "posts" of R Help through nabble forum. When I reply a post through the forum, it is distinctly clear that my message is a reply to the original poster's post, just like a conversation. Those posts which quote the original message which i

Re: [R] TRUE/FALSE

2010-08-09 Thread Uwe Ligges
On 09.08.2010 17:47, Wu Gong wrote: I can't understand why you doubled "(" "if((combos[e,f]==1)" - A R learner. ? Can you please refer and quote the original messages you are replying to and can you please also include the one who asked the question? Not everybody is subscribed to t

Re: [R] TRUE/FALSE

2010-08-09 Thread Wu Gong
I can't understand why you doubled "(" "if((combos[e,f]==1) " - A R learner. -- View this message in context: http://r.789695.n4.nabble.com/TRUE-FALSE-tp2318668p2318684.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-pr