Re: [R] breaking a loop in R

2009-07-04 Thread NatsS
://www.nabble.com/breaking-a-loop-in-R-tp21322868p24325853.html Sent from the R help mailing list archive at Nabble.com. __ 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

Re: [R] breaking a loop in R

2009-07-04 Thread Allan Engelhardt
The break command can only break the innermost loop (the b loop in your case). Rewrite the loop control logic. Here is one example end.a - FALSE; for (a in 1:10) { print(a); for (b in 1:20) { if (a 5 b 5 ) { end.a - TRUE; break; # Breaks the b loop } };

[R] breaking a loop in R

2009-01-06 Thread kayj
the rest of the program. Thanks for your help -- View this message in context: http://www.nabble.com/breaking-a-loop-in-R-tp21322868p21322868.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https

Re: [R] breaking a loop in R

2009-01-06 Thread jim holtman
of the program. Thanks for your help -- View this message in context: http://www.nabble.com/breaking-a-loop-in-R-tp21322868p21322868.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch

Re: [R] breaking a loop in R

2009-01-06 Thread Stavros Macrakis
? `break` On Tue, Jan 6, 2009 at 7:58 PM, kayj kjaj...@yahoo.com wrote: I was wondering if there is anything that breaks a loop in R [[alternative HTML version deleted]] __ R-help@r-project.org mailing list