From henr|k@bengt@@on @end|ng |rom gm@||@com  Sat Jun 22 18:49:17 2019
From: henr|k@bengt@@on @end|ng |rom gm@||@com (Henrik Bengtsson)
Date: Sat, 22 Jun 2019 09:49:17 -0700
Subject: [Rd] methods package: A _R_CHECK_LENGTH_1_LOGIC2_=true error
Message-ID: <CAFDcVCQOWVr0p2e2HONOy9NvqPdpoAH=HPMOEP65K-N6UjhA2g@mail.gmail.com>

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(oligo)
Error in omittedSig && (signature[omittedSig] != "missing") :
  'length(x) = 4 > 1' in coercion to 'logical(1)'
Error: unable to load R code in package 'oligo'

is because of a '_R_CHECK_LENGTH_1_LOGIC2_=true' mistake in the
'methods' package.  Here's the patch:

$ svn diff src/library/methods/R/RMethodUtils.R &
[1] 1062
Index: src/library/methods/R/RMethodUtils.R
===================================================================
--- src/library/methods/R/RMethodUtils.R (revision 76731)
+++ src/library/methods/R/RMethodUtils.R (working copy)
@@ -343,7 +343,7 @@
              call. = TRUE, domain = NA)
     }
     else if(!all(signature[omittedSig] == "missing")) {
-        omittedSig <- omittedSig && (signature[omittedSig] != "missing")
+        omittedSig <- omittedSig & (signature[omittedSig] != "missing")
         .message("Note: ", .renderSignature(f, sig0),
                  gettextf("expanding the signature to include omitted
arguments in definition: %s",
                           paste(sigNames[omittedSig], "=
\"missing\"",collapse = ", ")))
[1]+  Done                    svn diff src/library/methods/R/RMethodUtils.R

Maybe still in time for R 3.6.1?

/Henrik



[Rd] methods package: A _R_CHECK_LENGTH_1_LOGIC2_=true error
Henrik Bengtsson