search for: invokerestarts

Displaying 20 results from an estimated 40 matches for "invokerestarts".

Did you mean: invokerestart
2012 Sep 11
1
Is invokeRestart("abort") unstoppable?
Hi, I'm trying to implement an abort() method that works just like stop() but does not signal the condition such that try() and tryCatch(..., condition=...) are, contrary to stop(), effectively non-working with abort() calls. In order to achieve this, I stumbled upon invokeRestart("abort"), cf. help("invokeRestart", package="base") that reads "Restarts are
2018 Jul 28
4
re-throwing an interrupt condition
Anyone knows a way to re-throw a caught interrupt condition, so that it behaves just like the original one? I.e. no error message is printed, but the execution is stopped of course. With just calling stop in the error handler, it prints the error message, or, if there is no error message (like in the original interrupt condition), another error happens. tryCatch(Sys.sleep(100), interrupt =
2012 Oct 21
1
suppress *specific* warnings?
Not desperately important, but nice to have and possibly of use to others, is the ability to suppress specific warnings rather than suppressing warnings indiscriminately. I often know of a specific warning that I want to ignore (because I know that's it's a false positive/ignorable), but the current design of suppressWarnings() forces me to ignore *any* warnings coming from the
2004 Mar 11
2
No traceback available when using try(...)
Hello, 1. The Situation : ------------------------ The stack traceback is not available when error ouccured in a try(....) -- test.R -------------------------------- f<-function(a){ return ( log(a) ) } try(f("A")) traceback() ------------------------------------------- I get the following message : > try(f("A")) Error in log(x) : Non-numeric argument to mathematical
2010 Dec 05
1
How to catch both warnings and errors?
Dear expeRts, I am struggling with warning/error handling. I would like to call a function which can produce either a) normal output b) a warning c) an error Since the function is called several (thousand) times in a loop, I would like to proceed "quietly" and collect the warnings and errors [to deal with them at a later point]. I have seen constructs with tryCatch (which can
2019 Feb 24
1
stopifnot
>From https://github.com/HenrikBengtsson/Wishlist-for-R/issues/70 : ... and follow up note from 2018-03-15: Ouch... in R-devel, stopifnot() has become yet 4-5 times slower; ... which is due to a complete rewrite using tryCatch() and withCallingHandlers(). >From https://stat.ethz.ch/pipermail/r-devel/2017-May/074256.html , it seems that 'tryCatch' was used to avoid the following
2018 Jul 26
2
Possible bug: R --slave --interactive stdin echo on Linux when stdin is a fifo
On Thu, 26 Jul 2018, G?bor Cs?rdi wrote: > On Thu, Jul 26, 2018 at 12:25 PM Barry Rowlingson > <b.rowlingson at lancaster.ac.uk> wrote: >> >> On Thu, Jul 26, 2018 at 12:22 AM, G?bor Cs?rdi <csardi.gabor at gmail.com> wrote: >>> I am trying to control a background R session, connected via a fifo / >>> named pipe. >> >> Is the fifo
2018 Jul 28
0
re-throwing an interrupt condition
The internal code does more or less signalCondition(e) ## allows for (another) handler cat("\n") ## cleans up console invokeRestart("abort") ## jump to 'abort' restart if not handled [for back compatibility it also runs the error option code if that is set, but that may go away eventually]. A version of your example: > { +
2012 Jan 11
0
Problem concerning withRestarts and R2WinBUGS
...neration and analysis steps in a second function embedded in the overall one, and calling this second function using the withRestarts and invokeRestart options, but I can´t get this to work. Can somebody help me figure this out by telling me if this is even possible, and if so, how withRestarts and invokeRestarts should be called to do this? Alternatively, if any of you know an other way to aqcuire the desired effect I´m also very interested. Kind regards, Joran Jongerling [[alternative HTML version deleted]]
2012 Feb 03
1
Resume processing after warning handler.
Dear list! I have a script that processes a large number of data files. When one file fails to process correctly, I want the script to write a message and to continue with the next file. I achieved this with tryCatch: for (f in files) tryCatch({heavy.lifting(f)}, error=function(e) log.error.to.file(e)) I also want to log warning messages and tried something like this: for (f in
2012 Feb 03
1
GAM (mgcv) warning: matrix not positive definite
Dear list, I fitted the same GAM model using directly the function gam(mgcv) ... then as a parameter of another function that capture the warnings messages (see below). In the first case, there is no warning message printed, but in the last one, the function find two warning messages stating "matrix not positive definite" So my question is: Do I have to worry about those warnings and
2015 Sep 10
2
Using IDs to suppress specific messages and warnings
The suppressMessages and suppressWarnings functions currently suppress all the message or warnings that are generated by the input expression. The ability to suppress only specific messages or warnings is sometimes useful, particularly for cases like file import where there are lots of things that can go wrong. Suppressing only messages that match a regular expression has rightly been rejected
2019 Feb 27
1
stopifnot
My points: - The 'withCallingHandlers' construct that is used in current 'stopifnot' code has no effect. Without it, the warning message is the same. The overridden warning is not raised. The original warning stays. - Overriding call in error and warning to 'cl.i' doesn't always give better outcome. The original call may be "narrower" than 'cl.i'. I
2019 May 03
1
Strange error messages from parallel::mcparallel family under 3.6.0
Dear All, Since upgrading to 3.6.0, I've been getting a strange error messages from the child process when using mcparallel/mccollect. Before filing a report in the Bugzilla, I want to figure out whether I had been doing something wrong all this time and R 3.6.0 has exposed it, or whether something else is going on. # Background # Ultimately, what I want to do is to be able to set a time
2019 Jun 21
0
Suggested Patch: Library returns matching installed packages when typo present
> On 6/21/19 10:56 AM, Tierney, Luke wrote: > [...] > Something that would be useful and is being considered is having a > mechanism for registering default condition handlers. This would allow > the condition to be re-signaled with a custom class and then having > a custom conditionMessage method is less likely to cause conflicts. Is it correct that you are proposing something
2019 Jun 21
2
Suggested Patch: Library returns matching installed packages when typo present
Hi Luke, Thank you for your response. On 6/21/19 10:56 AM, Tierney, Luke wrote: Thanks for the suggestion. However I don't think it is the right way to go. I also don't care for what install.packages() does. Signaling a warning and then an error means someone has to catch both the error and the warning, or suppress the warning, in order to handle the error programmatically. I do care
2012 May 15
1
KEGGSOAP installation error
Hello, I'm trying to install KEGGSOAP with bioconductor but i'm facing this problem: /> biocLite("KEGGSOAP") BioC_mirror: http://bioconductor.org Using R version 2.15, BiocInstaller version 1.4.4. Installing package(s) 'KEGGSOAP' trying URL 'http://www.bioconductor.org/packages/2.10/bioc/src/contrib/KEGGSOAP_1.30.0.tar.gz' Content type
2013 Jun 07
1
cannot load pbdMPI package after compilation
Hello, I try to install pbdMPI. Compilation successful, but load fails with segfault. Is anyone can help me? R version 3.0.0 pbdMPI version 0.1-6 Intel compiler version 13.1.1 OpenMPI version 1.6.4-1 CPU Intel x86_64 # R CMD INSTALL pbdMPI_0.1-6.tar.gz .. .... checking for gcc... icc -std=gnu99 checking whether the C compiler works... yes checking for C compiler default output file name...
2015 Sep 10
0
Using IDs to suppress specific messages and warnings
Conditions have classes and the condition system is designed around the idea that classes would be used for this sort of thing. That is already how tryCatch and withCallingHandlers discriminate the conditions to handle. Designing and implementing a condition class hierarchy to support this is indeed the hard/tedious part. Best, luke On Thu, 10 Sep 2015, Richard Cotton wrote: > The
2018 Jul 26
0
Possible bug: R --slave --interactive stdin echo on Linux when stdin is a fifo
On Thu, Jul 26, 2018 at 1:43 PM <luke-tierney at uiowa.edu> wrote: > > On Thu, 26 Jul 2018, G?bor Cs?rdi wrote: > > > On Thu, Jul 26, 2018 at 12:25 PM Barry Rowlingson > > <b.rowlingson at lancaster.ac.uk> wrote: > >> > >> On Thu, Jul 26, 2018 at 12:22 AM, G?bor Cs?rdi <csardi.gabor at gmail.com> wrote: > >>> I am trying to