Henrik Bengtsson
2019-Jun-22 16:49 UTC
[Rd] methods package: A _R_CHECK_LENGTH_1_LOGIC2_=true error
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
peter dalgaard
2019-Jun-23 08:53 UTC
[Rd] methods package: A _R_CHECK_LENGTH_1_LOGIC2_=true error
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 Bengtsson <henrik.bengtsson at gmail.com> wrote: > > 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 > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel-- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Office: A 4.23 Email: pd.mes at cbs.dk Priv: PDalgd at gmail.com
Henrik Bengtsson
2019-Jun-23 18:29 UTC
[Rd] methods package: A _R_CHECK_LENGTH_1_LOGIC2_=true error
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 && (signature[omittedSig] != "missing") : 'length(x) = 4 > 1' in coercion to 'logical(1)' Error: unable to load R code in package ?oligo? /Henrik On Sun, Jun 23, 2019 at 1:54 AM peter dalgaard <pdalgd at gmail.com> wrote:> > 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 Bengtsson <henrik.bengtsson at gmail.com> wrote: > > > > 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 > > > > ______________________________________________ > > R-devel at r-project.org mailing list > > https://stat.ethz.ch/mailman/listinfo/r-devel > > -- > Peter Dalgaard, Professor, > Center for Statistics, Copenhagen Business School > Solbjerg Plads 3, 2000 Frederiksberg, Denmark > Phone: (+45)38153501 > Office: A 4.23 > Email: pd.mes at cbs.dk Priv: PDalgd at gmail.com > > > > > > > > >
Apparently Analagous Threads
- methods package: A _R_CHECK_LENGTH_1_LOGIC2_=true error
- methods package: A _R_CHECK_LENGTH_1_LOGIC2_=true error
- methods package: A _R_CHECK_LENGTH_1_LOGIC2_=true error
- methods package: A _R_CHECK_LENGTH_1_LOGIC2_=true error
- methods package: A _R_CHECK_LENGTH_1_LOGIC2_=true error