From 7bc60e4f65fae57f962e6a73e1e244ac9b0bba0a Mon Sep 17 00:00:00 2001 From: Henrik Bengtsson Date: Fri, 3 Jan 2025 12:44:12 -0800 Subject: [PATCH] Nagging 'ties.method' warnings now happens every 10:th call [#142] --- DESCRIPTION | 2 +- NEWS.md | 16 +++++++++++----- R/options.R | 4 ++-- man/matrixStats.options.Rd | 2 +- 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 869b273f..a836b6c5 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,5 +1,5 @@ Package: matrixStats -Version: 1.4.1-9008 +Version: 1.4.1-9009 Depends: R (>= 3.4.0) Suggests: diff --git a/NEWS.md b/NEWS.md index 6c45f6ad..87d60ef1 100644 --- a/NEWS.md +++ b/NEWS.md @@ -12,14 +12,20 @@ = NA` to a warning has been removed; `useNames = NA` is now always an error. + * Calling `colRanks()` and `rowRanks()` without explicitly specifying + argument `ties.method` is deprecated since version 1.3.0 + [2024-04-10]. If not explicitly specified, a deprecation warning is + now produced every 10:th call not specifying the `ties.method` + argument. + # Version 1.4.1 [2024-09-06] ## Bug Fixes - * Fix a potential `runtime error: null pointer passed as argument 1, - which is declared to never be null` bug introduced in v1.4.0 that - was detected by the UndefinedBehaviorSanitizer (UBSan) running on CRAN. + * Fix a `runtime error: null pointer passed as argument 1, which is + declared to never be null` bug introduced in v1.4.0 that was + detected by the UndefinedBehaviorSanitizer (UBSan) running on CRAN. # Version 1.4.0 [2024-09-03] @@ -43,8 +49,8 @@ ## Deprecated and Defunct * Calling `colRanks()` and `rowRanks()` without explicitly specifying - argument `ties.method` is deprecated since version 1.3.0. If not - explicitly specified, a deprecation warning is now produced every + argument `ties.method` is deprecated since version 1.3.0 [2024-04-10]. + If not explicitly specified, a deprecation warning is now produced every 25:th call not specifying the `ties.method` argument. diff --git a/R/options.R b/R/options.R index b5cca7f5..53c18ab3 100644 --- a/R/options.R +++ b/R/options.R @@ -54,7 +54,7 @@ #' \describe{ #' \item{\option{matrixStats.ties.method.freq}:}{(numeric) #' Controls how often the above validation is checked. -#' (Default: \code{25} - every 25:th call starting with the first)} +#' (Default: \code{10} - every 10:th call starting with the first)} #' } #' #' @section Environment variables that set R options: @@ -203,5 +203,5 @@ update_package_options <- function() { update_package_option("matrixStats.ties.method.missing", default = if (getRversion() >= "4.4.0") "deprecated" else "ignore", choices = c("deprecated", "defunct", "ignore")) - update_package_option("matrixStats.ties.method.freq", mode = "numeric", default = "25") + update_package_option("matrixStats.ties.method.freq", mode = "numeric", default = "10") } diff --git a/man/matrixStats.options.Rd b/man/matrixStats.options.Rd index d1946df4..0bce83fa 100644 --- a/man/matrixStats.options.Rd +++ b/man/matrixStats.options.Rd @@ -73,7 +73,7 @@ Below are the \R options and environment variables that are used by the \describe{ \item{\option{matrixStats.ties.method.freq}:}{(numeric) Controls how often the above validation is checked. - (Default: \code{25} - every 25:th call starting with the first)} + (Default: \code{10} - every 10:th call starting with the first)} } }