[Rd] R 3.5.0 fails its regression test suite on Linux/x86_64
Hi, I just tried to upgrade Nixpkgs to R 3.5.0, but unfortunately the new version fails its regression test suite. We configure the build using the flags "--without-recommended-packages", in case that's relevant. You can see a complete build log with all relevant information at [1]. Anyway, the test failures look like this: | make[3]: Entering directory '/build/R-3.5.0/tests/Examples' | Testing examples for package 'base' | Testing examples for package 'tools' | comparing 'tools-Ex.Rout' to 'tools-Ex.Rout.save' ... OK | Testing examples for package 'utils' | Testing examples for package 'grDevices' | comparing 'grDevices-Ex.Rout' to 'grDevices-Ex.Rout.save' ... OK | Testing examples for package 'graphics' | comparing 'graphics-Ex.Rout' to 'graphics-Ex.Rout.save' ... OK | Testing examples for package 'stats' | comparing 'stats-Ex.Rout' to 'stats-Ex.Rout.save' ... NOTE | 6599c6599 | < Grand Mean: 291.5937 | --- | > Grand Mean: 291.5938 | 15124c15124 | < Grand Mean: 291.5937 | --- | > Grand Mean: 291.5938 | 17444c17444 | < assertCondition: caught "error" | --- | > assertCondition: caught 'error' | Testing examples for package 'datasets' | comparing 'datasets-Ex.Rout' to 'datasets-Ex.Rout.save' ... OK | Testing examples for package 'methods' | Testing examples for package 'grid' | comparing 'grid-Ex.Rout' to 'grid-Ex.Rout.save' ... OK | Testing examples for package 'splines' | comparing 'splines-Ex.Rout' to 'splines-Ex.Rout.save' ... OK | Testing examples for package 'stats4' | comparing 'stats4-Ex.Rout' to 'stats4-Ex.Rout.save' ... OK | Testing examples for package 'tcltk' | Testing examples for package 'compiler' | Testing examples for package 'parallel' | make[3]: Leaving directory '/build/R-3.5.0/tests/Examples' | make[2]: Leaving directory '/build/R-3.5.0/tests' | make[2]: Entering directory '/build/R-3.5.0/tests' | make[2]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule. | running strict specific tests | make[3]: Entering directory '/build/R-3.5.0/tests' | running code in 'eval-etc.R' ... OK | comparing 'eval-etc.Rout' to './eval-etc.Rout.save' ...414,416c414,548 | < Warning message: | < In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, : | < there is no package called 'Matrix' | --- | > Trying some Matrix objects, too | > | > Matrix> Matrix(0, 3, 2) # 3 by 2 matrix of zeros -> sparse | > 3 x 2 sparse Matrix of class "dgCMatrix" | > | > [1,] . . | > [2,] . . | > [3,] . . | > | > Matrix> Matrix(0, 3, 2, sparse=FALSE)# -> 'dense' | > 3 x 2 Matrix of class "dgeMatrix" | > [,1] [,2] | > [1,]00 | > [2,]00 | > [3,]00 | > | > Matrix> Matrix(0, 2, 2, sparse=FALSE)# diagonal ! | > 2 x 2 diagonal matrix of class "ddiMatrix" | > [,1] [,2] | > [1,]0. | > [2,].0 | > | > Matrix> Matrix(0, 2, 2, sparse=FALSE, doDiag=FALSE)# -> dense | > 2 x 2 Matrix of class "dsyMatrix" | > [,1] [,2] | > [1,]00 | > [2,]00 | > | > Matrix> Matrix(1:6, 3, 2) # a 3 by 2 matrix (+ integer warning) | > 3 x 2 Matrix of class "dgeMatrix" | > [,1] [,2] | > [1,]14 | > [2,]25 | > [3,]36 | > | > Matrix> Matrix(1:6 + 1, nrow=3) | > 3 x 2 Matrix of class "dgeMatrix" | > [,1] [,2] | > [1,]25 | > [2,]36 | > [3,]47 | > | > Matrix> ## logical ones: | > Matrix> Matrix(diag(4) > 0)# -> "ldiMatrix" with diag = "U" | > 4 x 4 diagonal matrix of class "ldiMatrix" | > [,1] [,2] [,3] [,4] | > [1,] TRUE... | > [2,]. TRUE.. | > [3,].. TRUE. | > [4,]... TRUE | > | > Matrix> Matrix(diag(4) > 0, sparse=TRUE)# -> sparse... | > 4 x 4 sparse Matrix of class "lsCMatrix" | > | > [1,] | . . . | > [2,] . | . . | > [3,] . . | . | > [4,] . . . | | > | > Matrix> Matrix(diag(4) >= 0)# -> "lsyMatrix" (of all 'TRUE') | > 4 x 4 Matrix of class "lsyMatrix" | > [,1] [,2] [,3] [,4] | > [1,] TRUE TRUE TRUE TRUE | > [2,] TRUE TRUE TRUE TRUE | > [3,] TRUE TRUE TRUE TRUE | > [4,] TRUE TRUE TRUE TRUE | > | > Matrix> ## triangular | > Matrix> l3 <- upper.tri(matrix(,3,3)) | > | > Matrix> (M <- Matrix(l3)) # -> "ltCMatrix" | > 3 x 3 sparse Matrix of class "ltCMatrix" | > | > [1,] . | | | > [2,] . . | | > [3,] . . . | > | > Matrix> Matrix(! l3)# -> "ltrMatrix" | > 3 x 3 Matrix of class "ltrMatrix" | > [,1] [,2] [,3] | > [1,] TRUE . . | > [2,] TRUE TRUE . | > [3,] TRUE TRUE TRUE | > | > Matrix> as(l3, "CsparseMatrix") | > 3 x 3 sparse Matrix of class "lgCMatrix" | > | > [1,] . | | | > [2,] . . | | > [3,] . . . | > | > Matrix> Matrix(1:9, nrow=3, | > Matrix+dimnames = list(c("a", "b", "c"), c("A", "B", "C"))) | > 3 x 3 Matrix of class "dgeMatrix" | > A B C | > a 1 4 7 | > b 2 5 8 | > c 3 6 9 | > | >
Re: [Rd] R 3.5.0 fails its regression test suite on Linux/x86_64
On 23 April 2018 at 12:33, Peter Simons wrote: | Hi, | | I just tried to upgrade Nixpkgs to R 3.5.0, but unfortunately the new | version fails its regression test suite. We configure the build using | the flags "--without-recommended-packages", in case that's relevant. You | can see a complete build log with all relevant information at [1]. | Anyway, the test failures look like this: The flag instructs R not to build new 'recommended packages'; however the tests you run later need them. This release has a binary change so you actually need to rebuild dependent packages -- in other words I think you can expect (some of) these tests to fail until these recommended packages are rebuilt. >From the doc/NEWS file, lines 395 and on: * The object header layout has been changed to support merging the ALTREP branch. This requires re-installing packages that use compiled code. Dirk -- http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] R 3.5.0 fails its regression test suite on Linux/x86_64
On 23/04/2018 6:33 AM, Peter Simons wrote: Hi, I just tried to upgrade Nixpkgs to R 3.5.0, but unfortunately the new version fails its regression test suite. We configure the build using the flags "--without-recommended-packages", in case that's relevant. You can see a complete build log with all relevant information at [1]. Anyway, the test failures look like this: I haven't read the full script below, but a lot of it has to do with tests of Matrix, which is a recommended package. Since you built without it, they should be expected to fail. You can likely get rid of most of them by building with the recommended packages. Duncan Murdoch | make[3]: Entering directory '/build/R-3.5.0/tests/Examples' | Testing examples for package 'base' | Testing examples for package 'tools' | comparing 'tools-Ex.Rout' to 'tools-Ex.Rout.save' ... OK | Testing examples for package 'utils' | Testing examples for package 'grDevices' | comparing 'grDevices-Ex.Rout' to 'grDevices-Ex.Rout.save' ... OK | Testing examples for package 'graphics' | comparing 'graphics-Ex.Rout' to 'graphics-Ex.Rout.save' ... OK | Testing examples for package 'stats' | comparing 'stats-Ex.Rout' to 'stats-Ex.Rout.save' ... NOTE | 6599c6599 | < Grand Mean: 291.5937 | --- | > Grand Mean: 291.5938 | 15124c15124 | < Grand Mean: 291.5937 | --- | > Grand Mean: 291.5938 | 17444c17444 | < assertCondition: caught "error" | --- | > assertCondition: caught 'error' | Testing examples for package 'datasets' | comparing 'datasets-Ex.Rout' to 'datasets-Ex.Rout.save' ... OK | Testing examples for package 'methods' | Testing examples for package 'grid' | comparing 'grid-Ex.Rout' to 'grid-Ex.Rout.save' ... OK | Testing examples for package 'splines' | comparing 'splines-Ex.Rout' to 'splines-Ex.Rout.save' ... OK | Testing examples for package 'stats4' | comparing 'stats4-Ex.Rout' to 'stats4-Ex.Rout.save' ... OK | Testing examples for package 'tcltk' | Testing examples for package 'compiler' | Testing examples for package 'parallel' | make[3]: Leaving directory '/build/R-3.5.0/tests/Examples' | make[2]: Leaving directory '/build/R-3.5.0/tests' | make[2]: Entering directory '/build/R-3.5.0/tests' | make[2]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule. | running strict specific tests | make[3]: Entering directory '/build/R-3.5.0/tests' | running code in 'eval-etc.R' ... OK | comparing 'eval-etc.Rout' to './eval-etc.Rout.save' ...414,416c414,548 | < Warning message: | < In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, : | < there is no package called 'Matrix' | --- | > Trying some Matrix objects, too | > | > Matrix> Matrix(0, 3, 2) # 3 by 2 matrix of zeros -> sparse | > 3 x 2 sparse Matrix of class "dgCMatrix" | > | > [1,] . . | > [2,] . . | > [3,] . . | > | > Matrix> Matrix(0, 3, 2, sparse=FALSE)# -> 'dense' | > 3 x 2 Matrix of class "dgeMatrix" | > [,1] [,2] | > [1,]00 | > [2,]00 | > [3,]00 | > | > Matrix> Matrix(0, 2, 2, sparse=FALSE)# diagonal ! | > 2 x 2 diagonal matrix of class "ddiMatrix" | > [,1] [,2] | > [1,]0. | > [2,].0 | > | > Matrix> Matrix(0, 2, 2, sparse=FALSE, doDiag=FALSE)# -> dense | > 2 x 2 Matrix of class "dsyMatrix" | > [,1] [,2] | > [1,]00 | > [2,]00 | > | > Matrix> Matrix(1:6, 3, 2) # a 3 by 2 matrix (+ integer warning) | > 3 x 2 Matrix of class "dgeMatrix" | > [,1] [,2] | > [1,]14 | > [2,]25 | > [3,]36 | > | > Matrix> Matrix(1:6 + 1, nrow=3) | > 3 x 2 Matrix of class "dgeMatrix" | > [,1] [,2] | > [1,]25 | > [2,]36 | > [3,]47 | > | > Matrix> ## logical ones: | > Matrix> Matrix(diag(4) > 0)# -> "ldiMatrix" with diag = "U" | > 4 x 4 diagonal matrix of class "ldiMatrix" | > [,1] [,2] [,3] [,4] | > [1,] TRUE... | > [2,]. TRUE.. | > [3,].. TRUE. | > [4,]... TRUE | > | > Matrix> Matrix(diag(4) > 0, sparse=TRUE)# -> sparse... | > 4 x 4 sparse Matrix of class "lsCMatrix" | > | > [1,] | . . . | > [2,] . | . . | > [3,] . . | . | > [4,] . . . | | > | > Matrix> Matrix(diag(4) >= 0)# -> "lsyMatrix" (of all 'TRUE') | > 4 x 4 Matrix of class "lsyMatrix" | > [,1] [,2] [,3] [,4] | > [1,] TRUE TRUE TRUE TRUE | > [2,] TRUE TRUE TRUE TRUE | > [3,] TRUE TRUE TRUE TRUE | > [4,] TRUE TRUE TRUE TRUE | > | > Matrix> ## triangular | > Matrix> l3 <- upper.tri(matrix(,3,3)) | > | > Matrix> (M <- Matrix(l3)) # -> "ltCMatrix" | > 3 x 3 sparse Matrix of class "ltCMatrix" | > | > [1,] . | | | > [2,] . . | | > [3,] . . . | > | > Matrix> Matrix(! l3)# -> "ltrMatrix" | > 3 x 3 Matrix of class "ltrMatrix" |
Re: [Rd] R 3.5.0 fails its regression test suite on Linux/x86_64
Hi Dirk, > On 23 April 2018 at 12:33, Peter Simons wrote: > | Hi, > | > | I just tried to upgrade Nixpkgs to R 3.5.0, but unfortunately the new > | version fails its regression test suite. We configure the build using > | the flags "--without-recommended-packages", in case that's relevant. You > | can see a complete build log with all relevant information at [1]. > | Anyway, the test failures look like this: > > The flag instructs R not to build new 'recommended packages'; however the > tests you run later need them. Is there a way to disable only those tests that depend on the recommended packages? Would it make sense to disable these tests by default when “--without-recommended-packages” is passed? > This release has a binary change so you > actually need to rebuild dependent packages -- in other words I think you can > expect (some of) these tests to fail until these recommended packages are > rebuilt. I’ve hit the same problem as Peter in upgrading R for Guix. We build the recommended packages as separate packages later, so that we can offer a minimal R package. At the time when R itself is built the environment does not contain any R packages, so there is nothing to be rebuilt. Another problem with building the recommended packages as part of the R build process is that it’s more difficult to make them build bit-reproducibly. Building them as separate packages simplifies that and enables us to prevent e.g. the embedding of timestamps. -- Ricardo __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] R 3.5.0 fails its regression test suite on Linux/x86_64
Duncan Murdoch writes: > You can likely get rid of most of them by building with the recommended > packages. unfortunately, this is not an option for us. For various reasons, our build process requires that we build those packages separately. Ricardo appears to be in a similar situation and he has outlined some of those reasons already in his message. Anyway, it would be FAR better for us if "make check" would simply succeed in the configuration we're using. We'd be perfectly happy to have those tests disabled that cannot be executed without the recommended packages available. Is there a way to accomplish that? Best regards, Peter __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] R 3.5.0 fails its regression test suite on Linux/x86_64
On 23 April 2018 at 15:14, Peter Simons wrote: | Duncan Murdoch writes: | | > You can likely get rid of most of them by building with the recommended | > packages. | | unfortunately, this is not an option for us. For various reasons, our | build process requires that we build those packages separately. Ricardo | appears to be in a similar situation and he has outlined some of those | reasons already in his message. | | Anyway, it would be FAR better for us if "make check" would simply | succeed in the configuration we're using. We'd be perfectly happy to | have those tests disabled that cannot be executed without the | recommended packages available. | | Is there a way to accomplish that? I have been doing for R for about 20 years (if you count the time I assisted Doug Bates when he was still the maintainer) (and longer for Debian), and you seem to follow the same model we set up years ago of splitting the content of r-recommended (itself a virtual package) off r-base-core. You simply need to do this in stages. As Duncan stated, this is not a concern for R Core as they offer us a way to test the set. Dirk -- http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] R 3.5.0 fails its regression test suite on Linux/x86_64
Hi Dirk, > I have been doing for R for about 20 years (if you count the time I > assisted Doug Bates when he was still the maintainer) (and longer for > Debian), and you seem to follow the same model we set up years ago of > splitting the content of r-recommended (itself a virtual package) off > r-base-core. > > You simply need to do this in stages. I have packaged free software for 20+ years for many different distributions, and, in fact, I'm doing that professionally these days as an employee of one of the largest commercial Linux distributors. So please trust my expertise when I tell you that this is not what I want. What I want is ./configure --without-recommended-packages && make && make check to succeed without error, and I don't think that's an unreasonable expectation. I have reported these kind of errors before in past, and back then a friendly R developer simply took a moment to disable the offending tests when the build was configured with this particular flag and that solved the problem. I would hope that this is the outcome we can achieve this time, too. If no-one wants to make those changes for whatever reason, then that's fine and I'll just disable the test suite in NixOS to make the build succeed. I feel like that would be a sub-optimal solution, though. Best regards, Peter __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] R 3.5.0 fails its regression test suite on Linux/x86_64
Peter, I think we are on the same page, but there is little I can do for you here. Ultimately you are asking R Core to do you a favor. More below. On 23 April 2018 at 18:28, Peter Simons wrote: | Hi Dirk, | | > I have been doing for R for about 20 years (if you count the time I | > assisted Doug Bates when he was still the maintainer) (and longer for | > Debian), and you seem to follow the same model we set up years ago of | > splitting the content of r-recommended (itself a virtual package) off | > r-base-core. | > | > You simply need to do this in stages. | | I have packaged free software for 20+ years for many different distributions, | and, in fact, I'm doing that professionally these days as an employee of one of | the largest commercial Linux distributors. So please trust my expertise when I | tell you that this is not what I want. | | What I want is | | ./configure --without-recommended-packages && make && make check | | to succeed without error, and I don't think that's an unreasonable expectation. Sure. You "merely" have to get R Core to implement it for you. Given that it does not help them (they just build 'with recommended') and is not strictly needed (it will pass in a second pass once you used the first pass to build the recommended packages) it is a little hard to see how this 'nice to have' item may bubble higher on anybody's priorities. But the general rules is that if and when well-written patches are submitted on topics where there is agreement that a fix may help, then they are considered. So *you* could work on this. | I have reported these kind of errors before in past, and back then a friendly R | developer simply took a moment to disable the offending tests when the build | was configured with this particular flag and that solved the problem. I would | hope that this is the outcome we can achieve this time, too. R Core disabled tests in base R for you? Hm. Are you sure? Or are you by chance confusing R Core with a random package maintainer (like myself) who may have disabled a test? | If no-one wants to make those changes for whatever reason, then that's fine and | I'll just disable the test suite in NixOS to make the build succeed. I feel like | that would be a sub-optimal solution, though. You could comment it out now, and re-enable it once your package stack is refilled. Or you could make it 'make -k check' for now. It's really under your control as it your build environment. Dirk -- http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] R 3.5.0 fails its regression test suite on Linux/x86_64
On 23/04/2018 12:28 PM, Peter Simons wrote: Hi Dirk, > I have been doing for R for about 20 years (if you count the time I > assisted Doug Bates when he was still the maintainer) (and longer for > Debian), and you seem to follow the same model we set up years ago of > splitting the content of r-recommended (itself a virtual package) off > r-base-core. > > You simply need to do this in stages. I have packaged free software for 20+ years for many different distributions, and, in fact, I'm doing that professionally these days as an employee of one of the largest commercial Linux distributors. So please trust my expertise when I tell you that this is not what I want. What I want is ./configure --without-recommended-packages && make && make check to succeed without error, and I don't think that's an unreasonable expectation. So you're getting paid to do what you do, but you want the volunteers in R Core to do some work for you for free. I *do* think that's an unreasonable expectation. I have reported these kind of errors before in past, and back then a friendly R developer simply took a moment to disable the offending tests when the build was configured with this particular flag and that solved the problem. I would hope that this is the outcome we can achieve this time, too. Perhaps back then you were also a volunteer. If no-one wants to make those changes for whatever reason, then that's fine and I'll just disable the test suite in NixOS to make the build succeed. I feel like that would be a sub-optimal solution, though. I agree. You should spend some time working out a better one. Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Bug 16719: kruskal.test documentation for formula
I submit a couple options for addressing bug 16719: kruskal.test documentation for formula. https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=16719 disallow-character.diff changes the documentation and error message to indicate that factors are accepted. allow-character.diff changes the kruskal.test functions to convert character vectors to factors; documentation is updated accordingly. I tested the updated functions with the examples in example.R. It is based on the examples in the bug report. If there is interest in applying either patch, especially the latter, I want first to test the change on lots of existing programs that call kruskal.test, to see if it causes any regressions. Is there a good place to look for programs that use particular R functions? I am having trouble building R, so I have so far tested these changes only by patching revision 74631 (SVN head) and sourcing the resulting kruskal.test.R in R 3.4.1 on OpenBSD 6.2. I thus have not tested the R documentation files. Index: src/library/stats/R/kruskal.test.R === --- src/library/stats/R/kruskal.test.R (revision 74631) +++ src/library/stats/R/kruskal.test.R (working copy) @@ -46,7 +46,10 @@ x <- x[OK] g <- g[OK] if (!all(is.finite(g))) -stop("all group levels must be finite") +if (is.character(g)) +stop("all group levels must be finite; convert group to a factor") +else +stop("all group levels must be finite") g <- factor(g) k <- nlevels(g) if (k < 2L) Index: src/library/stats/man/kruskal.test.Rd === --- src/library/stats/man/kruskal.test.Rd (revision 74631) +++ src/library/stats/man/kruskal.test.Rd (working copy) @@ -22,11 +22,12 @@ \item{x}{a numeric vector of data values, or a list of numeric data vectors. Non-numeric elements of a list will be coerced, with a warning.} - \item{g}{a vector or factor object giving the group for the + \item{g}{a numeric vector or factor object giving the group for the corresponding elements of \code{x}. Ignored with a warning if \code{x} is a list.} \item{formula}{a formula of the form \code{response ~ group} where -\code{response} gives the data values and \code{group} a vector or +\code{response} gives the data values and \code{group} +a numeric vector or factor of the corresponding groups.} \item{data}{an optional matrix or data frame (or similar: see \code{\link{model.frame}}) containing the variables in the @@ -52,7 +53,8 @@ list, use \code{kruskal.test(list(x, ...))}. Otherwise, \code{x} must be a numeric data vector, and \code{g} must - be a vector or factor object of the same length as \code{x} giving + be a numeric vector or factor object of the same length as \code{x} + giving the group for the corresponding elements of \code{x}. } \value{ Index: src/library/stats/R/kruskal.test.R === --- src/library/stats/R/kruskal.test.R (revision 74631) +++ src/library/stats/R/kruskal.test.R (working copy) @@ -45,7 +45,7 @@ OK <- complete.cases(x, g) x <- x[OK] g <- g[OK] -if (!all(is.finite(g))) +if (!is.character(g) & !all(is.finite(g))) stop("all group levels must be finite") g <- factor(g) k <- nlevels(g) Index: src/library/stats/man/kruskal.test.Rd === --- src/library/stats/man/kruskal.test.Rd (revision 74631) +++ src/library/stats/man/kruskal.test.Rd (working copy) @@ -22,11 +22,13 @@ \item{x}{a numeric vector of data values, or a list of numeric data vectors. Non-numeric elements of a list will be coerced, with a warning.} - \item{g}{a vector or factor object giving the group for the + \item{g}{a character vector, numeric vector, or factor +giving the group for the corresponding elements of \code{x}. Ignored with a warning if \code{x} is a list.} \item{formula}{a formula of the form \code{response ~ group} where -\code{response} gives the data values and \code{group} a vector or +\code{response} gives the data values and \code{group} a +character vector, numeric vector, or factor of the corresponding groups.} \item{data}{an optional matrix or data frame (or similar: see \code{\link{model.frame}}) containing the variables in the @@ -52,7 +54,8 @@ list, use \code{kruskal.test(list(x, ...))}. Otherwise, \code{x} must be a numeric data vector, and \code{g} must - be a vector or factor object of the same length as \code{x} giving + be a numeric vector, character vector, or factor of the same length + as \code{x} giving the group for the corresponding elements of \code{x}. } \value{ s