Re: [Rd] methods package: A _R_CHECK_LENGTH_1_LOGIC2_=true error

2020-02-14 Thread Henrik Bengtsson
I still observe this error and just want to ping this thread so we don't forget it. Should I add this to https://bugs.r-project.org/bugzilla/ so it's tracked there? This thread in the archives: * https://stat.ethz.ch/pipermail/r-devel/2019-June/078049.html * https://stat.ethz.ch/pipermail/r-devel

Re: [Rd] methods package: A _R_CHECK_LENGTH_1_LOGIC2_=true error

2019-07-06 Thread Martin Maechler
> Suharto Anggono Suharto Anggono via R-devel > on Thu, 4 Jul 2019 15:13:55 + writes: > In 'conformMethod', there is another instance of > omittedSig & . > It just affects error message. > Original: >     if(any(is.na(match(signature[omittedSig], c("ANY", "mi

Re: [Rd] methods package: A _R_CHECK_LENGTH_1_LOGIC2_=true error

2019-07-04 Thread Suharto Anggono Suharto Anggono via R-devel
In 'conformMethod', there is another instance of omittedSig & . It just affects error message. Original:     if(any(is.na(match(signature[omittedSig], c("ANY", "missing") {         bad <- omittedSig & is.na(match(signature[omittedSig], c("ANY", "missing"))) After r76756:     if(any(iiN <- i

Re: [Rd] methods package: A _R_CHECK_LENGTH_1_LOGIC2_=true

2019-07-01 Thread Martin Maechler
. > -- > Georgi Boshnakov The 2nd patch I committed -- the one mostly to rematchDefiniton() -- does exactly that: It uses .local() calls where those argument *are* named which should be named. ==> hence the above example works fine there. Martin > -

Re: [Rd] methods package: A _R_CHECK_LENGTH_1_LOGIC2_=true

2019-07-01 Thread Georgi Boshnakov
) or maybe even .local(object, , target). -- Georgi Boshnakov ------ Date: Sat, 29 Jun 2019 22:44:49 +0200 From: Martin Maechler To: R-devel , Henrik Bengtsson Cc: Martin Maechler Subject: Re: [Rd] methods package: A _R_CHECK_LENGTH_1_LOGIC2_=true error Mes

Re: [Rd] methods package: A _R_CHECK_LENGTH_1_LOGIC2_=true error

2019-06-29 Thread Martin Maechler
> Martin Maechler > on Sat, 29 Jun 2019 12:05:49 +0200 writes: > Martin Maechler > on Sat, 29 Jun 2019 10:33:10 +0200 writes: > peter dalgaard > on Fri, 28 Jun 2019 16:20:03 +0200 writes: >>> > On 28 Jun 2019, at 16:03 , Martin Maechler wrote: >>>

Re: [Rd] methods package: A _R_CHECK_LENGTH_1_LOGIC2_=true error

2019-06-29 Thread Martin Maechler
> Martin Maechler > on Sat, 29 Jun 2019 10:33:10 +0200 writes: > peter dalgaard > on Fri, 28 Jun 2019 16:20:03 +0200 writes: >> > On 28 Jun 2019, at 16:03 , Martin Maechler wrote: >> > >> >> Henrik Bengtsson >> >>on Thu, 27 Jun 2019 16:00:

Re: [Rd] methods package: A _R_CHECK_LENGTH_1_LOGIC2_=true error

2019-06-29 Thread Martin Maechler
> peter dalgaard > on Fri, 28 Jun 2019 16:20:03 +0200 writes: > > On 28 Jun 2019, at 16:03 , Martin Maechler > > wrote: > > > >> Henrik Bengtsson > >>on Thu, 27 Jun 2019 16:00:39 -0700 writes: > > > >> Using: > >> > >> untrace(methods::conformMethod) > >> at <- c(12,

Re: [Rd] methods package: A _R_CHECK_LENGTH_1_LOGIC2_=true error

2019-06-28 Thread peter dalgaard
> On 28 Jun 2019, at 16:03 , Martin Maechler wrote: > >> Henrik Bengtsson >>on Thu, 27 Jun 2019 16:00:39 -0700 writes: > >> Using: >> >> untrace(methods::conformMethod) >> at <- c(12,4,3,2) >> str(body(methods::conformMethod)[[at]]) >> ## language omittedSig <- omittedSig && (si

Re: [Rd] methods package: A _R_CHECK_LENGTH_1_LOGIC2_=true error

2019-06-28 Thread Martin Maechler
> Henrik Bengtsson > on Thu, 27 Jun 2019 16:00:39 -0700 writes: > Using: > > untrace(methods::conformMethod) > at <- c(12,4,3,2) > str(body(methods::conformMethod)[[at]]) > ## language omittedSig <- omittedSig && (signature[omittedSig] != "missing") > cc <- 0L > trace(methods::confor

Re: [Rd] methods package: A _R_CHECK_LENGTH_1_LOGIC2_=true error

2019-06-27 Thread Henrik Bengtsson
Using: untrace(methods::conformMethod) at <- c(12,4,3,2) str(body(methods::conformMethod)[[at]]) ## language omittedSig <- omittedSig && (signature[omittedSig] != "missing") cc <- 0L trace(methods::conformMethod, tracer = quote({ cc <<- cc + 1L print(cc) if (cc == 31) { ## manually identifi

Re: [Rd] methods package: A _R_CHECK_LENGTH_1_LOGIC2_=true error

2019-06-27 Thread Martin Maechler
> peter dalgaard > on Thu, 27 Jun 2019 16:23:14 +0200 writes: > Henrik, > If a minimal reprex is hard to construct, could you perhaps instrument your version of R to include a browser() call at the start of the > else if(!all(signature[omittedSig] == "missing")) {

Re: [Rd] methods package: A _R_CHECK_LENGTH_1_LOGIC2_=true error

2019-06-27 Thread peter dalgaard
Henrik, If a minimal reprex is hard to construct, could you perhaps instrument your version of R to include a browser() call at the start of the else if(!all(signature[omittedSig] == "missing")) { branch, run the code that triggers the issue for you (and must hit that branch) and tell us

Re: [Rd] methods package: A _R_CHECK_LENGTH_1_LOGIC2_=true error

2019-06-25 Thread peter dalgaard
Ah, not quite: The logic is that if something has omittedSig and "missing" is not the signature, those signatures get _set_ to missing. There's just a bit of tap-dancing around to find exactly which they are so that there can be a message about changing them. -pd > On 25 Jun 2019, at 09:44 , p

Re: [Rd] methods package: A _R_CHECK_LENGTH_1_LOGIC2_=true error

2019-06-25 Thread peter dalgaard
Argh! Yes you are right, the "fix" doesn't. And I fell into the same "hey it's a vector so && has to be wrong"-trap. So this has to be reverted to something that has at least failed unconspicuously for a decade Will do. Thanks to Martin for remaining suspicious! [This code was originally fr

Re: [Rd] methods package: A _R_CHECK_LENGTH_1_LOGIC2_=true error

2019-06-24 Thread Henrik Bengtsson
**Maybe this bug needs to be understood further before applying the patch because patch is most likely also wrong** Because, from just looking at the expressions, I think neither the R 3.6.0 version: omittedSig <- omittedSig && (signature[omittedSig] != "missing") nor the patched version (I prop

Re: [Rd] methods package: A _R_CHECK_LENGTH_1_LOGIC2_=true error

2019-06-24 Thread Martin Maechler
> Henrik Bengtsson via R-core > on Sun, 23 Jun 2019 11:29:58 -0700 writes: > Thank you. > To correct myself, I can indeed reproduce this with R --vanilla too. > A reproducible example is: > $ R --vanilla > R version 3.6.0 Patched (2019-05-31 r76629) -- "Planting o

Re: [Rd] methods package: A _R_CHECK_LENGTH_1_LOGIC2_=true error

2019-06-23 Thread Henrik Bengtsson
Thank you. To correct myself, I can indeed reproduce this with R --vanilla too. A reproducible example is: $ R --vanilla R version 3.6.0 Patched (2019-05-31 r76629) -- "Planting of a Tree" ... > Sys.setenv("_R_CHECK_LENGTH_1_LOGIC2_" = "true") > loadNamespace("oligo") Error in omittedSig && (sign

Re: [Rd] methods package: A _R_CHECK_LENGTH_1_LOGIC2_=true error

2019-06-23 Thread peter dalgaard
This looks obvious enough, so I just committed your fix to R-devel and R-patched. I'm at the wrong machine for thorough testing, but at least it seems to build OK. However, I sense some risk that this could uncover sleeping bugs elsewhere, so watch out. -pd > On 22 Jun 2019, at 18:49 , Henrik

[Rd] methods package: A _R_CHECK_LENGTH_1_LOGIC2_=true error

2019-06-22 Thread Henrik Bengtsson
DISCLAIMER: I can not get this error with R --vanilla, so it only occurs when some other package is also loaded. I don't have time to find to narrow that down for a reproducible example, but I believe the following error in R 3.6.0: > Sys.setenv("_R_CHECK_LENGTH_1_LOGIC2_" = "true") > library(oli

Re: [Rd] methods package

2009-03-05 Thread Therneau, Terry M., Ph.D.
John, > the 2008 book ... I suspected that I had overlooked something simple. This fits the bill. > R 2.8.1 I have been using 2.7. I will update. Thanks for the help. Terry __ R-devel@r-project.org mailing list https://stat.ethz.ch/mai

Re: [Rd] methods package

2009-03-05 Thread John Chambers
Hi Terry, Terry Therneau wrote: I'm working on the next version of coxme, one step of which is converting the bdsmatrix library from Splus to R. Actually, it is a conversion from S4 methods as first described in the Green book to S4 methods as they currently exist. Mostly it's going ok, but

Re: [Rd] methods package

2009-03-05 Thread ml-it-r-devel
Terry Therneau wrote: > I'm working on the next version of coxme, one step of which is converting > the bdsmatrix library from Splus to R. Actually, it is a conversion from > S4 methods as first described in the Green book to S4 methods as they > currently exist. Mostly it's going ok, but not

[Rd] methods package

2009-03-04 Thread Terry Therneau
I'm working on the next version of coxme, one step of which is converting the bdsmatrix library from Splus to R. Actually, it is a conversion from S4 methods as first described in the Green book to S4 methods as they currently exist. Mostly it's going ok, but not entirely. 1. The biggest is

[Rd] methods package PROTECT "bug"

2007-03-14 Thread Seth Falcon
Hi, src/library/methods/src/methods_list_dispatch.c has the following code which is part of the definition of R_dispatchGeneric: /* get its class */ SEXP arg; int check_err; PROTECT(arg = R_tryEval(arg_sym, ev, &check_err)); if(check_err)