You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Whenever calling colRanks() or rowRanks() from matrixStats, please specify argument ties.method explicitly. In future releases of matrixStats, it will be an error if not doing so.
We will roll out this change slowly. First users of your package will see warnings, which are non-breaking. Only in a later release, matrixStats will produce errors, which then are breaking.
To be ahead of this, please update your package to explicitly specify the ties.method.
Background
The matrixStats package will eventually require that argument ties.method of colRanks() and rowRanks() is explicitly specified. Relying on the default value will become deprecated, and eventually also defunct. For example, instead of calling colRanks(X), one could specify colRanks(X, ties.method = "max") or colRanks(X, ties.method = "average").
The reason for this is that the default ties.method value for colRanks() and rowRanks() is currently ties.method = "max", whereas the corresponding one for base::rank() is ties.method = "average". We want the matrixStats functions to eventually also default to ties.method = "average". In order to do so, we cannot just switch from one version to the other, because that would change the result. You can read about this in HenrikBengtsson/matrixStats#142.
This is why we are reaching out to you, so you can make sure to use the ties.method that you intended. When scanning packages that use colRanks() and rowRanks() of matrixStats without specifying the ties.method argument, your package came up. See below for details.
Details
We ran reverse-package dependency checks (R CMD check) with environment variable R_MATRIXSTATS_TIES_METHOD_MISSING=defunct to detect with missing ties.method argument. You package came up with the following.
* using log directory ‘/c4/home/henrik/repositories/matrixStats/revdep/checks/pecora/new/pecora.Rcheck’
* using R version 4.3.3 (2024-02-29)
* using platform: x86_64-pc-linux-gnu (64-bit)
* R was compiled by
gcc (GCC) 10.2.1 20210130 (Red Hat 10.2.1-11)
GNU Fortran (GCC) 10.2.1 20210130 (Red Hat 10.2.1-11)
* running under: CentOS Linux 7 (Core)
* using session charset: UTF-8
* using option ‘--no-manual’
* checking for file ‘pecora/DESCRIPTION’ ... OK
* checking extension type ... Package
* this is package ‘pecora’ version ‘0.1.1’
* package encoding: UTF-8
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for executable files ... OK
* checking for hidden files and directories ... OK
* checking for portable file names ... OK
* checking for sufficient/correct file permissions ... OK
* checking whether package ‘pecora’ can be installed ... WARNING
Found the following significant warnings:
/c4/home/henrik/repositories/matrixStats/revdep/library/pecora/RcppArmadillo/include/armadillo_bits/fn_reshape.hpp:63:13: warning: ‘arma::Mat<typename T1::elem_type> arma::reshape(const arma::Base<typename T1::elem_type, T1>&, arma::uword, arma::uword, arma::uword)’ is deprecated: don't use this form: it will be removed [-Wdeprecated-declarations]
/c4/home/henrik/repositories/matrixStats/revdep/library/pecora/RcppArmadillo/include/armadillo_bits/fn_reshape.hpp:65:7: warning: ‘arma::Mat<typename T1::elem_type> arma::reshape(const arma::Base<typename T1::elem_type, T1>&, arma::uword, arma::uword, arma::uword)’ is deprecated: don't use this form: it will be removed [-Wdeprecated-declarations]
/c4/home/henrik/repositories/matrixStats/revdep/library/pecora/RcppArmadillo/include/armadillo_bits/fn_reshape.hpp:74:9: warning: ‘arma::Mat<typename T1::elem_type> arma::reshape(const arma::Base<typename T1::elem_type, T1>&, arma::uword, arma::uword, arma::uword)’ is deprecated: don't use this form: it will be removed [-Wdeprecated-declarations]
See ‘/c4/home/henrik/repositories/matrixStats/revdep/checks/pecora/new/pecora.Rcheck/00install.out’ for details.
* used C++ compiler: ‘g++ (GCC) 10.2.1 20210130 (Red Hat 10.2.1-11)’
* checking installed package size ... OK
* checking package directory ... OK
* checking DESCRIPTION meta-information ... OK
* checking top-level files ... OK
* checking for left-over files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* checking R files for non-ASCII characters ... OK
* checking R files for syntax errors ... OK
* checking whether the package can be loaded ... OK
* checking whether the package can be loaded with stated dependencies ... OK
* checking whether the package can be unloaded cleanly ... OK
* checking whether the namespace can be loaded with stated dependencies ... OK
* checking whether the namespace can be unloaded cleanly ... OK
* checking loading without being on the library search path ... OK
* checking dependencies in R code ... OK
* checking S3 generic/method consistency ... OK
* checking replacement functions ... OK
* checking foreign function calls ... OK
* checking R code for possible problems ... OK
* checking Rd files ... OK
* checking Rd metadata ... OK
* checking Rd cross-references ... OK
* checking for missing documentation entries ... OK
* checking for code/documentation mismatches ... OK
* checking Rd \usage sections ... OK
* checking Rd contents ... OK
* checking for unstated dependencies in examples ... OK
* checking line endings in C/C++/Fortran sources/headers ... OK
* checking line endings in Makefiles ... OK
* checking compilation flags in Makevars ... OK
* checking for GNU extensions in Makefiles ... OK
* checking for portable use of $(BLAS_LIBS) and $(LAPACK_LIBS) ... OK
* checking use of PKG_*FLAGS in Makefiles ... OK
* checking compiled code ... OK
* checking examples ... ERROR
Running examples in ‘pecora-Ex.R’ failed
The error most likely occurred in:
> ### Name: pecora-package
> ### Title: pecora-package
> ### Aliases: pecora-package pecora.package pecorapackage
> ### Keywords: package
>
> ### ** Examples
>
>
> X <- matrix(rnorm(100*20), nrow=20)
> out <- oneSample(X = X)
> pv <- t2p(Test = out, alternative = "two.sided")
Error: [matrixStats] Please explicitly specify argument 'ties.method' when calling colRanks() and rowRanks() of matrixStats. This is because the current default ties.method="max" will eventually be updated to ties.method="average" in order to align with the default of base::rank()
Execution halted
* DONE
Status: 1 ERROR, 1 WARNING
The text was updated successfully, but these errors were encountered:
matrixStats 1.5.0 is now on CRAN, and it produces a warning about this every 10:th call. In the next release, matrixStats 1.6.0, this will become an error. This will result in CRAN removing your pecora package unless this is corrected, so please be proactive and fixing it already now.
TL;DR
Whenever calling
colRanks()
orrowRanks()
from matrixStats, please specify argumentties.method
explicitly. In future releases of matrixStats, it will be an error if not doing so.We will roll out this change slowly. First users of your package will see warnings, which are non-breaking. Only in a later release, matrixStats will produce errors, which then are breaking.
To be ahead of this, please update your package to explicitly specify the
ties.method
.Background
The matrixStats package will eventually require that argument
ties.method
ofcolRanks()
androwRanks()
is explicitly specified. Relying on the default value will become deprecated, and eventually also defunct. For example, instead of callingcolRanks(X)
, one could specifycolRanks(X, ties.method = "max")
orcolRanks(X, ties.method = "average")
.The reason for this is that the default
ties.method
value forcolRanks()
androwRanks()
is currentlyties.method = "max"
, whereas the corresponding one forbase::rank()
isties.method = "average"
. We want the matrixStats functions to eventually also default toties.method = "average"
. In order to do so, we cannot just switch from one version to the other, because that would change the result. You can read about this in HenrikBengtsson/matrixStats#142.This is why we are reaching out to you, so you can make sure to use the
ties.method
that you intended. When scanning packages that usecolRanks()
androwRanks()
of matrixStats without specifying theties.method
argument, your package came up. See below for details.Details
We ran reverse-package dependency checks (
R CMD check
) with environment variableR_MATRIXSTATS_TIES_METHOD_MISSING=defunct
to detect with missingties.method
argument. You package came up with the following.The text was updated successfully, but these errors were encountered: