Re: [R] Pause loop

From: Marc Schwartz <marc_schwartz_at_comcast.net>
Date: Fri, 28 Dec 2007 12:24:34 -0600

On Fri, 2007-12-28 at 19:07 +0100, Armin Goralczyk wrote:
> Hi list
>
> How can I pause a loop (or any other function) for a defined time? E.g.
>
> for(i in 1:5) {print(1:i); 'function to pause for 10 seconds'}
>
> Thanks for help.

At least on Linux, see:

  ?Sys.sleep

Note the caveats regarding time resolution...

HTH, Marc Schwartz



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Fri 28 Dec 2007 - 18:30:08 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 28 Dec 2007 - 18:30:20 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.