Re: [R] Way to make R idle for some time and try something again later

From: Duncan Murdoch <murdoch_at_stats.uwo.ca>
Date: Sat 30 Jul 2005 - 05:33:20 EST

On 7/29/2005 3:13 PM, Tae-Hoon Chung wrote:
> Hi, All;
>
> I have a question. In R, what is the best way to make R idle for a while and
> try something again later? For example, suppose there is an R job which
> accesses a file that may be shared with other active jobs. So when the file
> is being accessed by other job, your job will not be able to access the file
> and your job will crash because of that. To avoid this, you want your job to
> try to access the file repeatedly with some time interval, say every 10
> seconds or something like that. Which is the best way to do this in R?

Sys.sleep(10) should give you a 10 second pause with very little impact on the system.

Duncan Murdoch



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Sat Jul 30 05:40:18 2005

This archive was generated by hypermail 2.1.8 : Sun 23 Oct 2005 - 14:59:34 EST