HenrikBengtsson / matrixStats

R package: Methods that Apply to Rows and Columns of Matrices (and to Vectors)
https://cran.r-project.org/package=matrixStats
203 stars 33 forks source link

CRAN request: CRAN packages with "data length differs from size of matrix" warnings #203

Closed HenrikBengtsson closed 3 years ago

HenrikBengtsson commented 3 years ago

Background

From: Prof Brian Ripley\ Date: Wed, May 12, 2021 at 12:50 PM Subject: CRAN packages with "data length differs from size of matrix" warnings To: ... Cc: CRAN

in R-devel checks.

In examples, we see

AHMbook CEGO CIMTx CRPClustering ENMeval Ecfun GEInter MAMSE MCAvariants MCMCvis MSbox MitISEM NPMLENCC OceanView PopED RegSDC Rivivc RobustGaSP SARP.compo SIDES StereoMorph SuperPCA TRMF arkhe bamlss biclust bravo calculus cbsem dartR depthTools dfConn distillery easySdcTable factorcpt fusedest hdi jackstraw lfmm linearOrdering lmeVarComp mBvs matrixStats matrixcalc metaSEM mgcv mixmeta mobForest moc.gapbk multiclassPairs mvSLOUCH mvnfast parsec performance plot3D plot3Drgl rbvs relabeLoadings relaimpo scuba snipEM spatialEco table1 tcgsaseq timereg topologyGSA umx vinereg visualFields

For example,

vinereg-Ex.Rout:  data length differs from size of matrix: [300 != 100 x 2]

multiclassPairs is also shown in vignette re-building.

For caMST during installation:

Warning in matrix(nrow = 10, ncol = 7, data = rep(c(1, 0, 0, 0, 0, 0, 0),  :    data length differs from size of matrix: [140 != 10 x 7]

Please correct before 2021-05-26 to safely retain your package on CRAN.

-- Brian D. Ripley Emeritus Professor of Applied Statistics, University of Oxford

Troubleshooting

No such warnings is shown in https://cran.r-project.org/web/checks/check_results_matrixStats.html. Will check back next week.

HenrikBengtsson commented 3 years ago

https://cran.r-project.org/web/checks/check_results_matrixStats.html now reports on these errors:

Check: examples
Result: ERROR
    Running examples in ‘matrixStats-Ex.R’ failed
...
    > x <- matrix(rnorm(2400), nrow = 50, ncol = 40)
    Error in matrix(rnorm(2400), nrow = 50, ncol = 40) :
     data length differs from size of matrix: [2400 != 50 x 40]
    Execution halted 

and

    Running the tests in ‘tests/rowAllAnys.R’ failed.
    Complete output:
    ...
     > x <- matrix(rep(1:28, length.out = 20 * 5), nrow = 10, ncol = 5)
     Error in matrix(rep(1:28, length.out = 20 * 5), nrow = 10, ncol = 5) :
     data length differs from size of matrix: [100 != 10 x 5]
     Execution halted