[Rd] GCC warning

2020-05-22 Thread Adrian Dușa
I am trying to submit a package on CRAN, and everything passes ok on all platforms but Debian, where CRAN responds with an automatic "significant" warning: * checking whether package ‘QCA’ can be installed ... [35s/35s] WARNING Found the following significant warnings: /usr/include/x86_64-linu

[Rd] Build failing on win64

2020-05-22 Thread Jeroen Ooms
As of commit 78536 earlier this morning the build is failing on windows 64, see https://r-devel.github.io I cannot immediately spot what is the problem. The build fails with: installing 'sysdata.rda' make[3]: *** [../../../share/make/basepkg.mk:151: sysdata] Error 127 make[2]: *** [Makefile.w

Re: [Rd] paste(character(0), collapse="", recycle0=FALSE) should be ""

2020-05-22 Thread Gabriel Becker
Hi Martin et al, On Thu, May 21, 2020 at 9:42 AM Martin Maechler wrote: > > Hervé Pagès > > on Fri, 15 May 2020 13:44:28 -0700 writes: > > > There is still the situation where **both** 'sep' and 'collapse' are > > specified: > > >> paste(integer(0), "nth", sep="", colla

Re: [Rd] Build failing on win64

2020-05-22 Thread Tomas Kalibera
Thanks, fixed now. Tomas On 5/22/20 10:18 AM, Jeroen Ooms wrote: As of commit 78536 earlier this morning the build is failing on windows 64, see https://r-devel.github.io I cannot immediately spot what is the problem. The build fails with: installing 'sysdata.rda' make[3]: *** [../../../sha

[Rd] Compatibility issues caused by new simplify argument in apply function

2020-05-22 Thread Lukas Lehnert via R-devel
Dear R Developers, the new simplify argument in apply causes that my package (hsdar) does not pass the checks in R-devel. The workaround, Kurt Hornik send me, is working for the R-code: if("simplify" %in% names(formals(base::apply))) do something else do something else Unfortunately, I c

[Rd] pbirthday() for larger number of classes

2020-05-22 Thread Marius Hofert
Hi, pbirthday(, coincident = 2) starts to issue warnings (see (*) below) for larger number of classes (R 4.0.0, R-devel ./src/library/stats/R/birthday.R:47). The default coincident = 2 is computed as 1 - prod((c:(c - n + 1))/rep(c, n)) where c = classes. Using exp(log(...)), one can derive the re

Re: [Rd] Compatibility issues caused by new simplify argument in apply function

2020-05-22 Thread Duncan Murdoch
You didn't explained what the error is. This is what it looks like to me, but I'm probably wrong in some details: 1. R-devel added an argument to the apply() function, so the header has changed from function (X, MARGIN, FUN, ...) to function(X, MARGIN, FUN, ..., simplify = TRUE) 2. Yo

Re: [Rd] Compatibility issues caused by new simplify argument in apply function

2020-05-22 Thread Henrik Bengtsson
Interesting problem. I'm very rusty on S4 but would one solution be to, already now, add 'simplify = TRUE' to the S4 method and document it; setMethod("apply", signature(X = "Speclib"), function(X, FUN, bySI = NULL, ...,

Re: [Rd] paste(character(0), collapse="", recycle0=FALSE) should be ""

2020-05-22 Thread Hervé Pagès
I think that paste(c("a", "b"), NULL, c("c", "d"), sep = " ", collapse = ",", recycle0=TRUE) should just return an empty string and don't see why it needs to emit a warning or raise an error. To me it does exactly what the user is asking for, which is to change how the 3 arguments are r

Re: [Rd] Compatibility issues caused by new simplify argument in apply function

2020-05-22 Thread Duncan Murdoch
On 22/05/2020 11:47 a.m., Henrik Bengtsson wrote: Interesting problem. I'm very rusty on S4 but would one solution be to, already now, add 'simplify = TRUE' to the S4 method and document it; setMethod("apply", signature(X = "Speclib"), function(X, FUN,

Re: [Rd] Compatibility issues caused by new simplify argument in apply function

2020-05-22 Thread Lukas Lehnert via R-devel
I am sorry for being not specific enough. Both of you were right with your guess how the initial problem looked like. I followed the suggestion of Henrik and at least on my computer it seems to work (sometimes solutions are much easier than you think). Let's see what CRAN tells me... Thank you

Re: [Rd] paste(character(0), collapse="", recycle0=FALSE) should be ""

2020-05-22 Thread William Dunlap via R-devel
I agree with Herve, processing collapse happens last so collapse=non-NULL always leads to a single character string being returned, the same as paste(collapse=""). See the altPaste function I posted yesterday. Bill Dunlap TIBCO Software wdunlap tibco.com On Fri, May 22, 2020 at 9:12 AM Hervé Pa

Re: [Rd] paste(character(0), collapse="", recycle0=FALSE) should be ""

2020-05-22 Thread Gabriel Becker
I understand that this is consistent but it also strikes me as an enormous 'gotcha' of a magnitude that 'we' are trying to avoid/smooth over at this point in user-facing R space. For the record I'm not suggesting it should return something other than "", and in particular I'm not arguing that any

[Rd] R-devel's ...names() questions

2020-05-22 Thread William Dunlap via R-devel
Am am missing something or does the new ...names() in R-devel not work right? > a <- function(x, ...) ...names() > a(a=stop("a"), b=stop("b")) [1] "a" "" > a(stop("x"), stop("unnamed"), c=stop("c"), d=stop("d")) [1] NA "" "" > version _ platform x86_64-pc-linux-gnu arch

Re: [Rd] paste(character(0), collapse="", recycle0=FALSE) should be ""

2020-05-22 Thread Hervé Pagès
Gabe, It's the current behavior of paste() that is a major source of bugs: ## Add "rs" prefix to SNP ids and collapse them in a ## comma-separated string. collapse_snp_ids <- function(snp_ids) paste("rs", snp_ids, sep="", collapse=",") snp_groups <- list( group1=c(55, 22, 200)

Re: [Rd] pbirthday() for larger number of classes

2020-05-22 Thread Marius Hofert
... and one should include the pigeonhole principle: pbirthday2 <- function(n, classes = 365) { c <- classes # as pbirthday() if(n >= 2) { if(n > classes) 1 else -expm1(sum(log1p(-(1:(n-1))/classes))) } else 0 } __ R-devel@r-project.

[Rd] round() and signif() do not check argument names when a single argument is given

2020-05-22 Thread Shane Mueller
Hi, I was told to send this to the -devel list instead of posting to bugzilla. When round our signif are called with a single named argument, R does not check the name and runs the function with that named argument directly as the first argument, using 0.0 or 6.0 (6 in the case of signif) for th

Re: [Rd] paste(character(0), collapse="", recycle0=FALSE) should be ""

2020-05-22 Thread brodie gaslam via R-devel
> On Friday, May 22, 2020, 6:16:45 PM EDT, Hervé Pagès > wrote: > > Gabe, > > It's the current behavior of paste() that is a major source of bugs: > >   ## Add "rs" prefix to SNP ids and collapse them in a >   ## comma-separated string. >   collapse_snp_ids <- function(snp_ids) >   paste("rs"

Re: [Rd] GCC warning

2020-05-22 Thread Simon Urbanek
Adrian, newer compilers are better at finding bugs - you may want to read the full trace of the error, it tells you that you likely have a memory overflow when using strncpy() in your package. You should check whether it is right. Unfortunately we can’t help you more specifically, because I don