Re: [R] Stopping a function execution automatically after a given time

2008-04-05 Thread Prof Brian Ripley
For information, the R-devel version of R now has an experimental function setTimerLimit() to set time limit(s) (elapsed and/or CPU) for each top-level function. It will be a while before (or even if) it is released, but it may prove useful to those with an immediate need. On Wed, 2 Apr

Re: [R] Stopping a function execution automatically after a given time

2008-04-02 Thread Bert Gunter
: Wednesday, April 02, 2008 8:07 AM To: [EMAIL PROTECTED] Subject: [R] Stopping a function execution automatically after a given time Dear all, I often need to execute functions repeatedly (thousands or more times). While doing so, I encounter two types of problems: 1.) In some models

Re: [R] Stopping a function execution automatically after a given time

2008-04-02 Thread mel
Lukas Rode a écrit : Nowever, with regard to #2, I am lost. I would like to set a maximum time limit (say, 1 minute) and if my procedure is still running then, I would like to move on to the next model. begin_time = as.difftime(format(Sys.time(), '%H:%M:%S'), units='secs'); for(...) {

Re: [R] Stopping a function execution automatically after a given time

2008-04-02 Thread Lukas Rode
Dear Bert and Mel, thanks for your help, but I'm afraid this doesn't solve my problem. As I wrote in my previous mail (cf quote below) in most cases I will not be able to modify the code of the function that I want to run. This is why I was asking for a wrapper solution similar to what tryCatch

Re: [R] Stopping a function execution automatically after a given time

2008-04-02 Thread Duncan Murdoch
On 4/2/2008 12:00 PM, Lukas Rode wrote: Dear Bert and Mel, thanks for your help, but I'm afraid this doesn't solve my problem. As I wrote in my previous mail (cf quote below) in most cases I will not be able to modify the code of the function that I want to run. This is why I was asking

Re: [R] Stopping a function execution automatically after a given time

2008-04-02 Thread Philippe Grosjean
You should look at AutoIt or Autohotkey for this. Best, Philippe Grosjean Duncan Murdoch wrote: On 4/2/2008 12:00 PM, Lukas Rode wrote: Dear Bert and Mel, thanks for your help, but I'm afraid this doesn't solve my problem. As I wrote in my previous mail (cf quote below) in most cases I

Re: [R] Stopping a function execution automatically after a given time

2008-04-02 Thread Prof Brian Ripley
On Wed, 2 Apr 2008, Duncan Murdoch wrote: On 4/2/2008 12:00 PM, Lukas Rode wrote: Dear Bert and Mel, thanks for your help, but I'm afraid this doesn't solve my problem. As I wrote in my previous mail (cf quote below) in most cases I will not be able to modify the code of the function that I