similar to: using withCallingHandlers, how to deal with warning( , immediate. = TRUE)?

Displaying 20 results from an estimated 10000 matches similar to: "using withCallingHandlers, how to deal with warning( , immediate. = TRUE)?"

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
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
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...
2012 Feb 06
1
Segfault on ".C" registration via R_CMethodDef according to 'Writing R Extensions'.
Dear R List, I encountered a serious problem regarding the registration of ".C" when following the documentation "Writing R Extensions" that leads to a segmentation fault (tested on windows and mac os x). The registration mechanism for ".C" routines via R_registerRoutines and the R_CMethodDef structure has been enhanced recently with the addition of two fields, one
2018 Mar 06
0
Capturing warning within user-defined function
You can capture warnings by using withCallingHandlers. Here is an example, its help file has more information. dataList <- list( A = data.frame(y=c(TRUE,TRUE,TRUE,FALSE,FALSE), x=1:5), B = data.frame(y=c(TRUE,TRUE,FALSE,TRUE,FALSE), x=1:5), C = data.frame(y=c(FALSE,FALSE,TRUE,TRUE,TRUE), x=1:5)) withWarnings <- function(expr) { .warnings <- NULL # warning handler will
2019 Mar 02
1
stopifnot
A private reply by Martin made me realize that I was wrong about stopifnot(exprs=TRUE) . It actually works fine. I apologize. What I tried and was failed was stopifnot(exprs=T) . Error in exprs[[1]] : object of type 'symbol' is not subsettable The shortcut assert <- function(exprs) stopifnot(exprs = exprs) mentioned in "Warning" section of the documentation similarly fails
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
2005 Sep 07
1
Tracebacks with tryCatch() and withCallingHandlers()?
When batch processing analysis, I use tryCatch() for failure handling and to prevent unwanted interrupts. I write detailed progress to log file and conditions (warnings and errors) are written to the same log file immediately by using withCallingHandlers(..., condition=function(c) cat(c, file=logFile)). However, I would also like to write the call stack to the log file to further simplify
2019 Mar 05
2
stopifnot
Another possible shortcut definition: assert <- function(exprs) do.call("stopifnot", list(exprs = substitute(exprs), local = parent.frame())) After thinking again, I propose to use ??? ? ? stop(simpleError(msg, call = if(p <- sys.parent()) sys.call(p))) - It seems that the call is the call of the frame where stopifnot(...) is evaluated. Because that is the correct context, I
2011 Jan 27
0
Problems installing gputools
Hi, I have some surprising trouble installing the gputools package. This is a linux box running Fedora with an Nvidia GeForce GTX 260 card and R 2.12.1 I had gputools running on it for the past several months. Wanting to update to the newest version, I simply executed install.packages("gputools") from within R. This should mean that the problem isn't in the hardware or OS. Errors
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
2009 Dec 30
1
seg-fault... but on what
I got the following after running succesfully through this loop 28 million times... the loop opens text files in a directory and inserts line by line into a database... *** caught segfault *** address 0xc0000010, cause 'memory not mapped' Traceback: 1: .getGeneric(f, where, package) 2: getGeneric("coerce", where = where) 3: as(obj, "integer") 4:
2010 Feb 08
2
Error on start R in server
Hello all, (Thank for your reply) I have a web-application in Apache Tomcat, when i start R in this application, I used packe RSJava Code ROmegahatInterpreter interp; String [] rargs = {"--no-save"}; REvaluator e; interp = new ROmegahatInterpreter ( ROmegahatInterpreter.fixArgs(rargs),false ); e =new REvaluator (); Errors ================ R version 2.10.1 (2009-12-14)
2009 Jan 07
1
Compiling R for Solaris 10 Intel
Hi, I downloaded 2.8.1 and tried to compile it using gcc 3.4.6. (simple install, just ./configure, make, make check, make install) I found that it compiled and went through the tests fine. The foreign library, however, that seems to be segfaulting on me (see output below). I did see an old posting about a similar problem, but there was no resolution. Have other people experienced this at all?
2024 May 08
1
Compilation problems with R4.4.0
I'm having a strange problem compiling R4.4.0 on an AlmaLinux9 box. I've compiled previous versions OK on the same hardware/software (last was R4.3.2) but 4.4.0 is repeatedly failing. Configuration works OK. ./configure --prefix=/bi/apps/R/4.4.0 --enable-R-shlib R is now configured for x86_64-pc-linux-gnu Source directory: . Installation directory: /bi/apps/R/4.4.0
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
2013 Nov 15
1
Inconsistent results between caret+kernlab versions
I'm using caret to assess classifier performance (and it's great!). However, I've found that my results differ between R2.* and R3.* - reported accuracies are reduced dramatically. I suspect that a code change to kernlab ksvm may be responsible (see version 5.16-24 here: http://cran.r-project.org/web/packages/caret/news.html). I get very different results between caret_5.15-61 +
2009 Oct 24
2
warnings details
I am running R as an invisible subprocess in another program (RExcel). Using try I can catch errors and print the errors produced by an R statement. Is there a way to know if running a statement caused a warning message? last.warning gives me the last warning, but I do not have any indication what the statement was that caused the message. I can of course store last warning before I run a
2018 Sep 19
5
segfault issue with parallel::mclapply and download.file() on Mac OS X
I have an lapply function call that I want to parallelize. Below is a very simplified version of the code: url_base <- "https://cloud.r-project.org/src/contrib/" files <- c("A3_1.0.0.tar.gz", "ABC.RAP_0.9.0.tar.gz") res <- parallel::mclapply(files, function(s) download.file(paste0(url_base, s), s)) Instead of download a couple of files in parallel, I get a
2010 Nov 09
1
R-2.12.0 problem on Solaris 10
It's been a few days I cannot compile to get R-2.12.0 working at sparc Solaris 10. Seems the R software installation is OK, but the recommended package called Matrix stopped me, since I can finish the installation with the configure option -with-recommended-packages=no. I then run Ø Install.packages("Matrix") Then last few lines of output are the following, 28: tryCatch(expr,