Displaying 2 results from an estimated 2 matches for "keepgoing".
Did you mean:
keep_going
2000 Jun 22
1
'pausing' in R
I have this 'odd' problem; I need to let R pause, for a given time, before
starting next iteration in a loop. I'm using the following to do this
task, but feel a little bit guilty because I'm using as much CPU time as I
can get while pausing:
while(keepGoing) {
t.end <- proc.time()[3] + 5 ## the time this loop should end at
[block of R commands]
while(proc.time()[3] < t.end) {}
}
This guaranty, at least, 5 second evaluation time for each loop in the
above case.
Can I delay the loop more efficiently, that is, not using as much CPU time...
2000 Jun 22
1
Summary: 'pausing' in R (fwd)
...:
> I have this 'odd' problem; I need to let R pause, for a given time, before
> starting next iteration in a loop. I'm using the following to do this
> task, but feel a little bit guilty because I'm using as much CPU time as I
> can get while pausing:
>
> while(keepGoing) {
> t.end <- proc.time()[3] + 5 ## the time this loop should end at
>
> [block of R commands]
>
> while(proc.time()[3] < t.end) {}
> }
>
> This guaranty, at least, 5 second evaluation time for each loop in the
> above case.
>
> Can I delay the loo...