)
}
-Original Message-
From: Prof Brian Ripley [mailto:rip...@stats.ox.ac.uk]
Sent: 07 December 2010 13:23
To: Santosh Srinivas
Cc: r-help@r-project.org
Subject: Re: [R] Time out for a R Function
On Tue, 7 Dec 2010, Santosh Srinivas wrote:
Hello Group,
I have an R-function that works fine
Cc: r-help@r-project.org
Subject: Re: [R] Time out for a R Function
On Tue, 7 Dec 2010, Santosh Srinivas wrote:
Hello Group,
I have an R-function that works fine for most part but sometime runs into
a
long loop! (I'm lazy and short on time to debug right now so want to do
something easy
Date: Tue, 7 Dec 2010 16:11:42 +1100
From: michael.bedw...@gmail.com
To: santosh.srini...@gmail.com; r-help@r-project.org
Subject: Re: [R] Time out for a R Function
Below is a toy function with one way of doing it. There are bound to
be better
Hello Group,
I have an R-function that works fine for most part but sometime runs into a
long loop! (I'm lazy and short on time to debug right now so want to do
something easy)
For my purpose, it is ok to make few errors is there a way I can put a
timeout on a function and the r-process
Below is a toy function with one way of doing it. There are bound to
be better ways :)
function(niter = 10, time.out = 3) {
pretend.task - function() {
Sys.sleep(0.5)
}
start - proc.time()
for (iter in 1:niter) {
pretend.task()
cur - proc.time() - start
if
See also R help thread 'Wait for keystroke or timeout':
http://www.mail-archive.com/r-help@r-project.org/msg97742.html
/H
On Mon, Dec 6, 2010 at 9:11 PM, Michael Bedward
michael.bedw...@gmail.com wrote:
Below is a toy function with one way of doing it. There are bound to
be better ways :)
On Tue, 7 Dec 2010, Santosh Srinivas wrote:
Hello Group,
I have an R-function that works fine for most part but sometime runs into a
long loop! (I'm lazy and short on time to debug right now so want to do
something easy)
For my purpose, it is ok to make few errors is there a way I can put
7 matches
Mail list logo