Displaying 20 results from an estimated 10000 matches similar to: "on.exit() handler being interrupted by time limit"
2019 May 22
1
make running on.exit expr uninterruptible
Hi,
Is there currently any way to guarantee that on.exit does not fail to execute the recorded expression because of a user interrupt arriving during function exit? Consider:
f <- function() {
suspendInterrupts({
on.exit(suspendInterrupts(cntr_on.exit <<- cntr_on.exit + 1L))
cntr_f <<- cntr_f + 1L
})
TRUE
}
It is possible to interrupt this function such that cntr_f
2016 Oct 26
5
BUG?: On Linux setTimeLimit() fails to propagate timeout error when it occurs (works on Windows)
setTimeLimit(elapsed=1) causes a timeout error whenever a call takes
more than one second. For instance, this is how it works on Windows
(R 3.3.1):
> setTimeLimit(elapsed=1)
> Sys.sleep(10); message("done")
Error in Sys.sleep(10) : reached elapsed time limit
Also, the error propagates immediately and causes an interrupt after ~1 second;
> system.time({ Sys.sleep(10);
2016 Oct 31
1
BUG?: On Linux setTimeLimit() fails to propagate timeout error when it occurs (works on Windows)
On Mon, 31 Oct 2016, Henrik Bengtsson wrote:
> Thank you for looking into this Luke.
>
> On Thu, Oct 27, 2016 at 9:26 AM, <luke-tierney at uiowa.edu> wrote:
>> On unix, unless event polling is enabled Sys.sleep just waits in a
>> select() call (with a SIGINT handler in place) so the elapsed time
>> isn't checked until after the select call is complete.
2016 Oct 27
2
BUG?: On Linux setTimeLimit() fails to propagate timeout error when it occurs (works on Windows)
On unix, unless event polling is enabled Sys.sleep just waits in a
select() call (with a SIGINT handler in place) so the elapsed time
isn't checked until after the select call is complete. Rstudio uses
event polling, and in particular sets R_wait_usec to 10000, which
means event and interrupt checks happen during a Sys.seep call. The R
GUI on macOS doesn't seem to do this (but my lldb
2016 Oct 26
3
BUG?: On Linux setTimeLimit() fails to propagate timeout error when it occurs (works on Windows)
Thank you for the feedback and confirmations. Interesting to see that
it's also reproducible on macOS expect for Spencer; that might
indicate a difference in builds.
BTW, my original post suggested that timeout error was for sure
detected while running Sys.sleep(10). However, it could of course
also be that it is only detected after it finishes.
For troubleshooting, the
2013 May 16
1
setTimeLimit sometimes fails to terminate idle call in R
I would like to use setTimeLimit to abort operations that are stuck
waiting (idle) after n seconds. Below a toy example in which Sys.sleep
is a placeholder call that is idle:
testlimit <- function(){
setTimeLimit(elapsed=3, transient=TRUE);
Sys.sleep(10);
}
system.time(testlimit());
However this is giving inconsistent results. On windows and in
r-studio server (linux) the call is
2016 Jun 18
1
vignette output: word_document problems
Hello:
Clicking "Knit Word" in RStudio 0.99.893 with R 3.3.0, works
fine with a vignette with "output: word_document". However, "R CMD
build" throws the following error:
$ R CMD build pkgW2vignettes
* checking for file ?pkgW2vignettes/DESCRIPTION? ... OK
* preparing ?pkgW2vignettes?:
* checking DESCRIPTION meta-information ... OK
* installing the
2018 Jan 19
1
setSessionLimit
Hello
The doc/NEWS.2 file mentions a setSessionLimit function, added with
version 2.8.0
??? o?? setTimeLimit() function to set limits on the CPU
??????? and/or elapsed time for each top-level computation, and
??????? setSessionLimit() to set limits for the rest of the session.
However, I no longer see this function in recent versions of R, and
there is no mention of its removal in the NEWS
2011 Dec 16
2
Event handling in R
Dear R-helpers,
I've just started playing with getGraphicsEvent() in R, and was wondering if there is a simple way to stop this function waiting for input after a pre-defined time, instead of relying either on a non-NULL value from one of the event handlers or for a user-interrupt for it to halt (as per the R manual).
The only way that I've thought of to make this work is using
2012 Jan 13
0
WISHLIST: Be able to timeout readline()/stdin via setTimeLimit in all consoles
Hi.
WISHLIST:
Regardless on console, I'd like to be able to timeout a call to
readline()/file("stdin", blocking=TRUE) via setTimeLimit.
OBSERVATION:
On Windows Rterm as well as plain R on Linux, setTimeLimit() does not
momentarily interrupt from stdin, but only after hitting RETURN. A
few examples:
timeout00 <- function() {
setTimeLimit(elapsed=5);
Sys.sleep(10);
}
2013 Jul 01
0
Error al correr archivo markdown
Estimada Gaby Nieves
Si usted usa Rsutudio puede crear un archivo nuevo, le sugiero crear este, sin colocar nada, deje lo que escribe en forma automática, y finalmente ejecute desde el botón knit html.
El fin es ver si nuevamente aparece el error.
Si no hay error puede ser la codificación de texto (enconding...), incluso hay un problema al mover un archivo de un lugar a otro.
Javier
From:
2013 Jul 01
2
Error al correr archivo markdown
Si, ya habia hecho un archivo markdown y lo habia corrido hace unos cuantos
meses
El sistema es windows 7 y R version 3.0.1 (2013-05-16)
el mensaje es el siguiente: > require(knitr); knit('Quiz1Markdown.Rmd',
encoding='ISO8859-1');
Loading required package: knitr
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]])
:
there is no package called
2012 Dec 13
4
Running MCMC in R
Dear all
I am now running a MCMC iteration in the R program. But it is always
stucked in some loop. This cause big problems for my research. So I want to
know whether we can skip the current dataset and move to next simulated
data when the iteration is stucked? Alternatively, can the MCMC chain skip
the current iteration when it is stucked and automatically to start another
chain with different
2016 Aug 30
2
Problemas para delimitar chunks con la fucnción spin en el paquete knitr
Muchas gracias Carlos.
Tengo las mismas versiones pero no logro separar los chunks cuando uso #+,
pero si lo logro cuando uso #". Mi script es spin("prueba.R", knit =
FALSE) y si me hace un Rmd.
#+
a = c(1,2,3)
#+
mean(a)
Ejecuto,
> spin("prueba.R", knit = FALSE)
y obtengo un prueba.Rmd
```{r }
a = c(1,2,3)
```{r }
mean(a)
```
Pero si escribo:
#'
a =
2013 Jul 01
0
Error al correr archivo markdown
Estimada Gaby
Mi configuración es la siguiente y funciona ¿esta le funciona a usted?
From: Gaby nieves
Sent: Monday, July 01, 2013 5:13 PM
To: Marcuzzi, Javier Rubén
Cc: r-help-es en r-project.org
Subject: Re: [R-es] Error al correr archivo markdown
Gracias, si uso R estudio, cree un documento nuevo, deje el ejemplo que el Restudio trae y me volvio a aparecer el mismo error, que puedo hacer
2012 May 01
0
knitr + markdown: simplemente útil
Hola:
Ya se ha comentado aquí algo sobre knitr, creo que la
alternativa a Sweave (al que le tengo un gran cariño).
La cosa va muy bien y lejos, os comento muy breve
y os adjunto dos ficheros para muestra.
Estoy buscando una forma de escribir potente y
ágil para que los alumnos trabaje al cien por cien
sin necesidad de aprender LaTeX (aqltugc).
Para eso había encontrado markdown pero
¿cómo hacer
2016 Oct 31
0
BUG?: On Linux setTimeLimit() fails to propagate timeout error when it occurs (works on Windows)
Thank you for looking into this Luke.
On Thu, Oct 27, 2016 at 9:26 AM, <luke-tierney at uiowa.edu> wrote:
> On unix, unless event polling is enabled Sys.sleep just waits in a
> select() call (with a SIGINT handler in place) so the elapsed time
> isn't checked until after the select call is complete. Rstudio uses
> event polling, and in particular sets R_wait_usec to 10000,
2013 Jul 01
3
Error al correr archivo markdown
Gracias, si uso R estudio, cree un documento nuevo, deje el ejemplo que el
Restudio trae y me volvio a aparecer el mismo error, que puedo hacer para
solucionarlo?
El 1 de julio de 2013 15:21, Marcuzzi, Javier Rubén <
javier.ruben.marcuzzi@gmail.com> escribió:
> Estimada Gaby Nieves
>
> Si usted usa Rsutudio puede crear un archivo nuevo, le sugiero crear este,
> sin colocar
2016 Oct 26
0
BUG?: On Linux setTimeLimit() fails to propagate timeout error when it occurs (works on Windows)
On 10/25/2016 9:44 PM, Henrik Bengtsson wrote:
> setTimeLimit(elapsed=1) causes a timeout error whenever a call takes
> more than one second. For instance, this is how it works on Windows
> (R 3.3.1):
>
>> setTimeLimit(elapsed=1)
>> Sys.sleep(10); message("done")
> Error in Sys.sleep(10) : reached elapsed time limit
>
> Also, the error propagates
2016 Oct 26
0
BUG?: On Linux setTimeLimit() fails to propagate timeout error when it occurs (works on Windows)
Spencer also had tools and rsconnect loaded (via a namespace) but it doesn't seem to make a difference for me if I load them. It also doesn't seem to matter for me whether it is CRAN R, locally built R, Terminal, R.app. However, RStudio differs
> setTimeLimit(elapsed=1)
Error: reached elapsed time limit
> setTimeLimit(elapsed=1)
Error: reached elapsed time limit
>