search for: grandsum

Displaying 1 result from an estimated 1 matches for "grandsum".

Did you mean: grands
2011 May 03
0
How do I break a foreach loop?
...ork in a foreach loop, is there a nice way to do that? A little more detail: I am using foreach to conduct a very time consuming (may take several days if done sequentially) simulation study. The number of simulations is set to 1000. So the command I am using looks like this simplified version: grandsum <- foreach(icount(1000), .combine="+") %dopar% { sim(...) } In fact, grandsum can never take a value greater than a threshold, say 10.0. So I want the number of iterations depend on the value of grandsum. Say when the grandsum is greater equal to 10.0 the computation should be termi...