search for: warningcall

Displaying 20 results from an estimated 20 matches for "warningcall".

2013 Jul 13
2
missing PROTECT() in src/main/arithmetic.c
at lines 651 & 653 (integer_binary function): if (code == DIVOP || code == POWOP) ans = allocVector(REALSXP, n); else ans = allocVector(INTSXP, n); There are calls to warningcall() later in the function, which can trigger garbbage collection. Looks like the typical scenario where it seemed pretty safe to not PROTECT in the original version of the function but became very unsafe 3 years later when the calls to warningcall() were added to the function. Cheers, H. -- Herv?...
2017 Mar 03
2
Control statements with condition with greater than one should give error (not just warning) [PATCH]
...= --- src/main/eval.c (revision 72298) +++ src/main/eval.c (working copy) @@ -1851,9 +1851,13 @@ Rboolean cond = NA_LOGICAL; if (length(s) > 1) { + int check = asInteger(GetOption1(install("check.condition"))); PROTECT(s); /* needed as per PR#15990. call gets protected by warningcall() */ - warningcall(call, - _("the condition has length > 1 and only the first element will be used")); + if(check != NA_INTEGER && check > 0) + errorcall(call, _("the condition has length > 1")); + else + warningcall(call, + _("the condition has le...
2017 Mar 03
0
Control statements with condition with greater than one should give error (not just warning) [PATCH]
...src/main/eval.c (working copy) > @@ -1851,9 +1851,13 @@ > Rboolean cond = NA_LOGICAL; > if (length(s) > 1) { > + int check = asInteger(GetOption1(install("check.condition"))); > PROTECT(s); /* needed as per PR#15990. call gets protected by > warningcall() */ > - warningcall(call, > - _("the condition has length > 1 and only the first element will be used")); > + if(check != NA_INTEGER && check > 0) > + errorcall(call, _("the condition has length > 1")); > + else >...
2017 Mar 03
2
Control statements with condition with greater than one should give error (not just warning) [PATCH]
...t; > @@ -1851,9 +1851,13 @@ > > Rboolean cond = NA_LOGICAL; > > > if (length(s) > 1) { > > + int check = asInteger(GetOption1(install("check.condition"))); > > PROTECT(s); /* needed as per PR#15990. call gets protected by > > warningcall() */ > > - warningcall(call, > > - _("the condition has length > 1 and only the first element will be used")); > > + if(check != NA_INTEGER && check > 0) > > + errorcall(call, _("the condition has length > 1")); >...
2011 Nov 11
1
When collected warnings exceeds 50
...fter what seems like a month working on this problem, I think I've narrowed it down to a simple test case. I'm testing with R-devel r57624 on ubuntu linux. Running the following under valgrind: R -d valgrind > options(warn=0) > for (i in 1:51) factor(1,levels=c(1,1) # duplicate level warningcall and you should see "Invalid read" messages. I've narrowed it down to vwarningcall_dflt starting a new R context via begincontext() but returning early without calling endcontext() in errors.c: svn diff src/main/errors.c Index: src/main/errors.c ====================================...
2013 Oct 12
1
[PATCH] minor suggestions for R-ints manual
...gth}, @code{truelength} followed by a block of C @code{double}s. @item CPLXSXP @code{length}, @code{truelength} followed by a block of C99 @code{double @@ -1330,7 +1330,7 @@ The relationship between the pairs is similar: @code{warning} tries to fathom out a suitable call, and then calls @code{warningcall} with that call as the first argument if it succeeds, and with @code{call = -R_NilValue} it is does not. When @code{warningcall} is called, it +R_NilValue} if it does not. When @code{warningcall} is called, it includes the deparsed call in its printout unless @code{call = R_NilValue}. @@ -22...
2009 Oct 30
1
parse_Rd and/or lazyload problem
...ck.7z" should unzip to create a fake package with a DESCRIPTION file and a "man" directory that contains two Rd files. Transcript of first example: eglist <- list( scrunge=tools:::prepare_Rd( 'd:/temp/scrunge.Rd', defines=.Platform$OS.type, stages='install', warningCalls=FALSE)) tools:::makeLazyLoadDB( eglist, 'd:/temp/ll', compress=FALSE) tools:::fetchRdDB( 'd:/temp/ll') # Error: cannot allocate vector of size 1.4 Gb The second example triggers an error with 'tools:::.install_package_Rd_objects' itself. It doesn't happen the first tim...
2017 Mar 04
3
Control statements with condition with greater than one should give error (not just warning) [PATCH]
Is there really a need for these complications? Packages emitting this warning are broken by definition and should be fixed. Perhaps we could "flip the switch" in a test environment and see how much havoc is wreaked and whether authors are sufficiently responsive? Michael On Sat, Mar 4, 2017 at 12:04 PM, Martin Maechler <maechler at stat.math.ethz.ch > wrote: >
2002 May 17
1
Re: [R] options()$warn==2 and try() (PR#1570)
> > I have a function called FitModels(), which simply takes in the > names of a data.frame and two variable names within that data.frame, and > fits and returns a list of objects from 2 coxph() fits, one main effects and > one interaction model. Sometimes the two variables are such that there is a > warning message: convergence has not been reached, or the X matrix is >
2018 Jan 30
2
sum() returns NA on a long *logical* vector when nb of TRUE values exceeds 2^31
Hi Martin, Henrik, Thanks for the follow up. @Martin: I vote for 2) without *any* hesitation :-) (and uniformity could be restored at some point in the future by having prod(), rowSums(), colSums(), and others align with the behavior of length() and sum()) Cheers, H. On 01/27/2018 03:06 AM, Martin Maechler wrote: >>>>>> Henrik Bengtsson <henrik.bengtsson at gmail.com>
2015 Dec 18
1
Assistance much appreciated
...ck[[i]]) 16: recurse(block[[i]]) 17: recurse(block) 18: getDynamicFlags(block) 19: recurse(block) 20: expandDynamicFlags(recurse(block), options) 21: processRdSexprs(Rd, stage, options, macros = attr(Rd, "macros")) 22: prepare_Rd(f, encoding = encoding, defines = os, stages = stages, warningCalls = FALSE, stage2 = step > 1L, stage3 = step > 2L, macros = macros) 23: FUN(X[[i]], ...) 24: lapply(files, .fetch_Rd_object) 25: .build_Rd_db(dir, manfiles, db_file = db_file, encoding = encoding, built_file = built_file) 26: tools:::.install_package_Rd_objects("/data/prj/...
2018 Feb 01
0
sum() returns NA on a long *logical* vector when nb of TRUE values exceeds 2^31
...less. It needs a bit more work, and I had also been considering replacing the numbers in the current overflow check if (ii++ > 1000) { \ ii = 0; \ if (s > 9000000000000000L || s < -9000000000000000L) { \ if(!updated) updated = TRUE; \ *value = NA_INTEGER; \ warningcall(call, _("integer overflow - use sum(as.numeric(.))")); \ return updated; \ } \ } \ i.e. think of tweaking the '1000' and '9000000000000000L', but decided to leave these and add comments there about why. For the moment. They may look arbitrary,...
2001 Oct 26
3
warnings --- wish/bug (PR#1148)
When R prints warnings, they often go "out of the line", it would be better if they where wrapped with writeLines(strwrap ... I tried to do that , changing the function warnings, but it has only effect when called explicitely, not when R prints the warnings unasked. Anyhow, here is the changed warnings: warnings <- function (...) { if (!(n <- length(last.warning)))
2009 Aug 06
1
[R] Repeatable, But Time Varying R GUI Crash (PR#13880)
On 8/6/2009 4:11 PM, Marilyn & Rich Short wrote: > Hello, > > I'm having a problem in R. The R GUI is crashing with a message to > contact Microsoft for the solution. I've contacted Microsoft and they > are of no help. Below is a distilled set of code that will cause the > crash. As you will see, there are two do-loops within which is a "load" >
1998 Jul 01
4
R-beta: R-0.62.1 under Digital Unix
I am grateful for the advice of Douglas Bates on my earlier problem in making R-0.62.1, but I'm afraid I'm still having problems.... I have been installing the various updates to R for quite some time on my alpha, and it is only now that I have been having really severe problems. The three or 4 versions before 0.61.1 installed without error. For 0.61.1 I needed to install GNU make. For
2006 Jul 27
6
Any interest in "merge" and "by" implementations specifically for sorted data?
Hi Developers, I am looking for another new project to help me get more up to speed on R and to learn something outside of R internals. One recent R issue I have run into is finding a fast implementations of the equivalent to the following SAS code: /* MDPC is an integer sort key made from two integer columns */ MDPC = (MD * 100000) + PCO; /* sort the dataset by the key */ PROC SORT;
2010 Sep 08
0
Correction to vec-subset speed patch
...@ -448,7 +448,7 @@ } stretch = 1; - PROTECT(indx = makeSubscript(x, s, &stretch, R_NilValue)); + PROTECT(indx = makeSubscript(x, s, &stretch, R_NilValue, 1)); n = length(indx); if(length(y) > 1) for(i = 0; i < n; i++) @@ -665,11 +665,11 @@ default: warningcall(call, "sub assignment (*[*] <- *) not done; __bug?__"); } - /* Check for additional named elements. */ + /* Check for additional named elements, if subscripting with strings. */ /* Note makeSubscript passes the additional names back as the use.names attribute (a...
2015 Dec 17
5
Assistance much appreciated
I have been struggling with this error message - and think I finally understand it's context. Start Line by line debugging shows me the function works: ... > saveRDS(val, mapfile) > val $variables $variables$IANA_HTTP_status_code_db [1] 0 1256 $variables$IANA_URI_scheme_db [1] 1256 3458 $variables$table_of_HTTP_status_codes [1] 4714 830 $references named list() $compressed
2006 Apr 24
0
R 2.3.0 is released
...rmation if it is available for that symbol. If the registration information is not available, the address is a reference to the native symbol. The default is FALSE which is backward compatible, returning just the address of the symbol and ignoring registration information. o errorcall and warningcall are now declared in <Rinternals.h> (they might be needed in front-ends). o R_FlushConsole and R_ProcessEvents are now declared in <R.h>. o The R_Sock* functions supporting socket connections are no longer declared in R-ftp-http.h as they are not loaded into R itself, and ar...
2006 Apr 24
0
R 2.3.0 is released
...rmation if it is available for that symbol. If the registration information is not available, the address is a reference to the native symbol. The default is FALSE which is backward compatible, returning just the address of the symbol and ignoring registration information. o errorcall and warningcall are now declared in <Rinternals.h> (they might be needed in front-ends). o R_FlushConsole and R_ProcessEvents are now declared in <R.h>. o The R_Sock* functions supporting socket connections are no longer declared in R-ftp-http.h as they are not loaded into R itself, and ar...