diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/DESCRIPTION r-bioc-delayedmatrixstats-1.24.0+ds/DESCRIPTION --- r-bioc-delayedmatrixstats-1.22.6+ds/DESCRIPTION 2023-08-28 20:30:24.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/DESCRIPTION 2023-10-24 20:59:02.000000000 +0000 @@ -2,10 +2,10 @@ Type: Package Title: Functions that Apply to Rows and Columns of 'DelayedMatrix' Objects -Version: 1.22.6 -Date: 2023-08-26 +Version: 1.24.0 +Date: 2023-10-12 Authors@R: c(person("Peter", "Hickey", role = c("aut", "cre"), - email = "peter.hickey@gmail.com"), + email = "peter.hickey@gmail.com", comment = c(ORCID = "0000-0002-8153-6258")), person("Hervé", "Pagès", role = "ctb", email = "hpages.on.github@gmail.com"), person("Aaron", "Lun", role = "ctb", email = "infinite.monkeys.with.keyboards@gmail.com")) Description: A port of the 'matrixStats' API for use with DelayedMatrix objects @@ -18,23 +18,23 @@ Encoding: UTF-8 Roxygen: list(markdown = TRUE) RoxygenNote: 7.2.3 -Depends: MatrixGenerics (>= 1.12.1), DelayedArray (>= 0.26.7) -Imports: methods, matrixStats (>= 1.0.0), sparseMatrixStats, Matrix (>= - 1.5-0), S4Vectors (>= 0.17.5), IRanges (>= 2.25.10) -Suggests: testthat, knitr, rmarkdown, covr, BiocStyle, microbenchmark, - profmem, HDF5Array +Depends: MatrixGenerics (>= 1.13.1), DelayedArray (>= 0.27.10) +Imports: methods, sparseMatrixStats (>= 1.13.2), Matrix (>= 1.5-0), + S4Vectors (>= 0.17.5), IRanges (>= 2.25.10) +Suggests: testthat, knitr, rmarkdown, BiocStyle, microbenchmark, + profmem, HDF5Array, matrixStats (>= 1.0.0) VignetteBuilder: knitr URL: https://github.com/PeteHaitch/DelayedMatrixStats BugReports: https://github.com/PeteHaitch/DelayedMatrixStats/issues biocViews: Infrastructure, DataRepresentation, Software git_url: https://git.bioconductor.org/packages/DelayedMatrixStats -git_branch: RELEASE_3_17 -git_last_commit: 7f082bf -git_last_commit_date: 2023-08-27 -Date/Publication: 2023-08-28 +git_branch: RELEASE_3_18 +git_last_commit: 8fb9c6e +git_last_commit_date: 2023-10-24 +Date/Publication: 2023-10-24 NeedsCompilation: no -Packaged: 2023-08-28 20:30:24 UTC; biocbuild -Author: Peter Hickey [aut, cre], +Packaged: 2023-10-24 20:59:02 UTC; biocbuild +Author: Peter Hickey [aut, cre] (), Hervé Pagès [ctb], Aaron Lun [ctb] Maintainer: Peter Hickey diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/R/AllGenerics.R r-bioc-delayedmatrixstats-1.24.0+ds/R/AllGenerics.R --- r-bioc-delayedmatrixstats-1.22.6+ds/R/AllGenerics.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/R/AllGenerics.R 2023-10-24 18:28:57.000000000 +0000 @@ -43,17 +43,36 @@ function(x, Nindex) standardGeneric("subset_by_Nindex") ) -#' @inherit matrixStats::colAnyMissings -#' @rdname colAnyNAs +#' @name DelayedMatrixStats-deprecated +#' @aliases colAnyMissings DelayedMatrixStats-deprecated +#' @title Deprecated functions in package \sQuote{DelayedMatrixStats} +#' @description These functions are provided for compatibility with older +#' versions of \sQuote{DelayedMatrixStats} only, and will be defunct at the +#' next release. +#' @inherit MatrixGenerics::colAnyNAs +#' @template common_params +#' @template lowercase_x +#' @details The following functions are deprecated and will be made defunct; +#' use the replacement indicated below: +#' \itemize{ +#' \item{colAnyMissings: \code{\link{colAnyNAs}}} +#' \item{rowAnyMissings: \code{\link{rowAnyNAs}}} +#' } #' @export setGeneric("colAnyMissings", signature = "x", function(x, rows = NULL, cols = NULL, - ..., useNames = NA) standardGeneric("colAnyMissings") + ..., useNames = NA) { + .Deprecated("colAnyNAs") + standardGeneric("colAnyMissings") + } ) -#' @rdname colAnyNAs +#' @rdname DelayedMatrixStats-deprecated #' @export setGeneric("rowAnyMissings", signature = "x", function(x, rows = NULL, cols = NULL, - ..., useNames = NA) standardGeneric("rowAnyMissings") + ..., useNames = NA) { + .Deprecated("rowAnyNAs") + standardGeneric("rowAnyMissings") + } ) diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/R/colAlls.R r-bioc-delayedmatrixstats-1.24.0+ds/R/colAlls.R --- r-bioc-delayedmatrixstats-1.22.6+ds/R/colAlls.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/R/colAlls.R 2023-10-24 18:28:57.000000000 +0000 @@ -8,7 +8,7 @@ .DelayedMatrix_block_colAlls <- function(x, rows = NULL, cols = NULL, value = TRUE, na.rm = FALSE, - ..., useNames = NA) { + ..., useNames = TRUE) { # Check input stopifnot(is(x, "DelayedMatrix")) DelayedArray:::.get_ans_type(x, must.be.numeric = FALSE) @@ -26,9 +26,7 @@ if (length(val) == 0L) { return(logical(ncol(x))) } - # NOTE: Return value of matrixStats::colAlls() has no names - # TODO: Obey top-level `useNames` argument. - unlist(val, recursive = FALSE, use.names = FALSE) + unlist(val, recursive = FALSE, use.names = useNames) } ### ---------------------------------------------------------------------------- @@ -47,14 +45,13 @@ #' @export #' @template example_dm_matrix #' @template example_dm_Rle -#' @template useNamesParameter #' @author Peter Hickey #' @examples #' #' colAlls(dm_matrix, value = 1) setMethod("colAlls", "DelayedMatrix", function(x, rows = NULL, cols = NULL, value = TRUE, na.rm = FALSE, - force_block_processing = FALSE, ..., useNames = NA) { + force_block_processing = FALSE, ..., useNames = TRUE) { .smart_seed_dispatcher(x, generic = MatrixGenerics::colAlls, blockfun = .DelayedMatrix_block_colAlls, force_block_processing = force_block_processing, diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/R/colAnyMissings.R r-bioc-delayedmatrixstats-1.24.0+ds/R/colAnyMissings.R --- r-bioc-delayedmatrixstats-1.22.6+ds/R/colAnyMissings.R 2023-06-09 18:04:41.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/R/colAnyMissings.R 2023-10-24 18:28:57.000000000 +0000 @@ -10,14 +10,12 @@ # General method # -#' @inherit matrixStats::colAnyNAs -#' @importMethodsFrom DelayedArray seed -#' @rdname colAnyNAs -#' @author Peter Hickey + +#' @rdname DelayedMatrixStats-deprecated #' @export setMethod("colAnyMissings", "DelayedMatrix", function(x, rows = NULL, cols = NULL, force_block_processing = FALSE, - ..., useNames = NA) { + ..., useNames = TRUE) { colAnyNAs(x = x, rows = rows, cols = cols, @@ -31,9 +29,10 @@ # Seed-aware methods # +#' @rdname DelayedMatrixStats-deprecated #' @export setMethod("colAnyMissings", "matrix", - function(x, rows = NULL, cols = NULL, ..., useNames = NA) { + function(x, rows = NULL, cols = NULL, ..., useNames = TRUE) { colAnyNAs(x = x, rows = rows, cols = cols, diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/R/colAnyNAs.R r-bioc-delayedmatrixstats-1.24.0+ds/R/colAnyNAs.R --- r-bioc-delayedmatrixstats-1.22.6+ds/R/colAnyNAs.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/R/colAnyNAs.R 2023-10-24 18:28:57.000000000 +0000 @@ -6,7 +6,7 @@ ### Exported methods ### -.DelayedMatrix_block_colAnyNAs <- function(x, rows, cols, ..., useNames = NA) { +.DelayedMatrix_block_colAnyNAs <- function(x, rows, cols, ..., useNames = TRUE) { colAnys(x = x, rows = rows, cols = cols, value = NA, ..., useNames = useNames) } @@ -19,7 +19,6 @@ #' @rdname colAnyNAs #' @template common_params #' @template lowercase_x -#' @template useNamesParameter #' @export #' @template example_dm_matrix #' @template example_dm_HDF5 @@ -32,7 +31,7 @@ #' rowAnyNAs(dm_HDF5) setMethod("colAnyNAs", "DelayedMatrix", function(x, rows = NULL, cols = NULL, force_block_processing = FALSE, - ..., useNames = NA) { + ..., useNames = TRUE) { .smart_seed_dispatcher(x, generic = MatrixGenerics::colAnyNAs, blockfun = .DelayedMatrix_block_colAnyNAs, force_block_processing = force_block_processing, diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/R/colAnys.R r-bioc-delayedmatrixstats-1.24.0+ds/R/colAnys.R --- r-bioc-delayedmatrixstats-1.22.6+ds/R/colAnys.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/R/colAnys.R 2023-10-24 18:28:57.000000000 +0000 @@ -8,10 +8,9 @@ .DelayedMatrix_block_colAnys <- function(x, rows = NULL, cols = NULL, value = TRUE, na.rm = FALSE, - ..., useNames = NA) { + ..., useNames = TRUE) { # Check input stopifnot(is(x, "DelayedMatrix")) - # TODO: Answer is always logical, so this might not be appropriate DelayedArray:::.get_ans_type(x, must.be.numeric = FALSE) # Subset @@ -27,9 +26,7 @@ if (length(val) == 0L) { return(logical(ncol(x))) } - # NOTE: Return value of matrixStats::colAnys() has no names - # TODO: Obey top-level `useNames` argument. - unlist(val, recursive = FALSE, use.names = FALSE) + unlist(val, recursive = FALSE, use.names = useNames) } ### ---------------------------------------------------------------------------- @@ -49,7 +46,7 @@ #' colAnys(dm_matrix, value = 2) setMethod("colAnys", "DelayedMatrix", function(x, rows = NULL, cols = NULL, value = TRUE, na.rm = FALSE, - force_block_processing = FALSE, ..., useNames = NA) { + force_block_processing = FALSE, ..., useNames = TRUE) { .smart_seed_dispatcher(x, generic = MatrixGenerics::colAnys, blockfun = .DelayedMatrix_block_colAnys, force_block_processing = force_block_processing, diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/R/colAvgsPerRowSet.R r-bioc-delayedmatrixstats-1.24.0+ds/R/colAvgsPerRowSet.R --- r-bioc-delayedmatrixstats-1.22.6+ds/R/colAvgsPerRowSet.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/R/colAvgsPerRowSet.R 2023-10-24 18:28:57.000000000 +0000 @@ -32,17 +32,16 @@ if (!is.null(W)) { W <- W[, k] } - matrixStats::colAvgsPerRowSet(as.matrix(X[S[, k], , drop = FALSE]), - W = W, - S = matrix(seq_len(nrow(S))), - FUN = FUN, - na.rm = na.rm, - tFUN = tFUN) + colAvgsPerRowSet(as.matrix(X[S[, k], , drop = FALSE]), + W = W, + S = matrix(seq_len(nrow(S))), + FUN = FUN, + na.rm = na.rm, + tFUN = tFUN) }) if (length(val) == 0L) { return(matrix(numeric(nrow(X)), nrow = nrow(X))) } - # NOTE: Return value of matrixStats::colAvgsPerRowSet() has rownames do.call(rbind, val) } @@ -67,7 +66,7 @@ setMethod("colAvgsPerRowSet", "DelayedMatrix", function(X, W = NULL, cols = NULL, S, FUN = colMeans, ..., force_block_processing = FALSE, na.rm = NA, tFUN = FALSE) { - .smart_seed_dispatcher(X, generic = MatrixGenerics::colAvgsPerRowSet, + .smart_seed_dispatcher(X, generic = MatrixGenerics::colAvgsPerRowSet, blockfun = .DelayedMatrix_block_colAvgsPerRowSet, force_block_processing = force_block_processing, W = W, diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/R/colCollapse.R r-bioc-delayedmatrixstats-1.24.0+ds/R/colCollapse.R --- r-bioc-delayedmatrixstats-1.22.6+ds/R/colCollapse.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/R/colCollapse.R 2023-10-24 18:28:57.000000000 +0000 @@ -7,7 +7,7 @@ ### .DelayedMatrix_block_colCollapse <- function(x, idxs, cols = NULL, - ..., useNames = NA) { + ..., useNames = TRUE) { # Check input stopifnot(is(x, "DelayedMatrix")) DelayedArray:::.get_ans_type(x, must.be.numeric = FALSE) @@ -28,20 +28,18 @@ if (length(val) == 0L) { return(numeric(ncol(x))) } - # NOTE: Return value of matrixStats::colCollapse() has no names - # TODO: Obey top-level `useNames` argument. - unlist(val, recursive = TRUE, use.names = FALSE) + unlist(val, recursive = FALSE, use.names = useNames) } #' @importFrom DelayedArray currentViewport makeNindexFromArrayViewport -.colCollapse_internal <- function(x, idxs, ..., useNames = NA) { +.colCollapse_internal <- function(x, idxs, ..., useNames = TRUE) { block.env <- parent.frame(2) vp <- currentViewport(block.env) subset <- makeNindexFromArrayViewport(vp)[[2]] if (!is.null(subset)) { idxs <- idxs[as.integer(subset)] } - matrixStats::colCollapse(x, idxs, ..., useNames = useNames) + colCollapse(x, idxs, ..., useNames = useNames) } ### ---------------------------------------------------------------------------- @@ -57,7 +55,6 @@ #' @rdname colCollapse #' @template common_params #' @template lowercase_x -#' @template useNamesParameter #' @export #' @template example_dm_matrix #' @template example_dm_HDF5 @@ -71,7 +68,7 @@ #' colCollapse(dm_HDF5, 4) setMethod("colCollapse", "DelayedMatrix", function(x, idxs, cols = NULL, - force_block_processing = FALSE, ..., useNames = NA) { + force_block_processing = FALSE, ..., useNames = TRUE) { .smart_seed_dispatcher(x, generic = MatrixGenerics::colCollapse, blockfun = .DelayedMatrix_block_colCollapse, force_block_processing = force_block_processing, diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/R/colCounts.R r-bioc-delayedmatrixstats-1.24.0+ds/R/colCounts.R --- r-bioc-delayedmatrixstats-1.22.6+ds/R/colCounts.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/R/colCounts.R 2023-10-24 18:28:57.000000000 +0000 @@ -8,7 +8,7 @@ .DelayedMatrix_block_colCounts <- function(x, rows = NULL, cols = NULL, value = TRUE, na.rm = FALSE, - ..., useNames = NA) { + ..., useNames = TRUE) { # Check input type stopifnot(is(x, "DelayedMatrix")) DelayedArray:::.get_ans_type(x, must.be.numeric = FALSE) @@ -26,9 +26,7 @@ if (length(val) == 0L) { return(numeric(ncol(x))) } - # NOTE: Return value of matrixStats::colCounts() has no names - # TODO: Obey top-level `useNames` argument. - unlist(val, recursive = FALSE, use.names = FALSE) + unlist(val, recursive = FALSE, use.names = useNames) } ### ---------------------------------------------------------------------------- @@ -47,7 +45,6 @@ #' @export #' @template example_dm_matrix #' @template example_dm_S4VectorsDF -#' @template useNamesParameter #' @author Peter Hickey #' @examples #' @@ -56,7 +53,7 @@ #' colCounts(dm_matrix, rows = 1:4, value = 1) setMethod("colCounts", "DelayedMatrix", function(x, rows = NULL, cols = NULL, value = TRUE, na.rm = FALSE, - force_block_processing = FALSE, ..., useNames = NA) { + force_block_processing = FALSE, ..., useNames = TRUE) { .smart_seed_dispatcher(x, generic = MatrixGenerics::colCounts, blockfun = .DelayedMatrix_block_colCounts, force_block_processing = force_block_processing, diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/R/colCummaxs.R r-bioc-delayedmatrixstats-1.24.0+ds/R/colCummaxs.R --- r-bioc-delayedmatrixstats-1.22.6+ds/R/colCummaxs.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/R/colCummaxs.R 2023-10-24 18:28:57.000000000 +0000 @@ -7,7 +7,7 @@ ### .DelayedMatrix_block_colCummaxs <- function(x, rows = NULL, cols = NULL, - ..., useNames = NA) { + ..., useNames = TRUE) { # Check input type stopifnot(is(x, "DelayedMatrix")) DelayedArray:::.get_ans_type(x, must.be.numeric = TRUE) @@ -23,9 +23,11 @@ if (length(val) == 0L) { return(numeric(ncol(x))) } - # NOTE: Return value of matrixStats::colCummaxs() has no names - # TODO: Obey top-level `useNames` argument. - unname(do.call(cbind, val)) + val <- do.call(cbind, val) + if (!useNames) { + val <- unname(val) + } + val } ### ---------------------------------------------------------------------------- @@ -41,7 +43,6 @@ #' @rdname colCummaxs #' @template common_params #' @template lowercase_x -#' @template useNamesParameter #' @export #' @template example_dm_matrix #' @template example_dm_MatrixMatrix @@ -51,7 +52,7 @@ #' colCummaxs(dm_matrix) setMethod("colCummaxs", "DelayedMatrix", function(x, rows = NULL, cols = NULL, - force_block_processing = FALSE, ..., useNames = NA) { + force_block_processing = FALSE, ..., useNames = TRUE) { .smart_seed_dispatcher(x, generic = MatrixGenerics::colCummaxs, blockfun = .DelayedMatrix_block_colCummaxs, force_block_processing = force_block_processing, diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/R/colCummins.R r-bioc-delayedmatrixstats-1.24.0+ds/R/colCummins.R --- r-bioc-delayedmatrixstats-1.22.6+ds/R/colCummins.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/R/colCummins.R 2023-10-24 18:28:57.000000000 +0000 @@ -7,7 +7,7 @@ ### .DelayedMatrix_block_colCummins <- function(x, rows = NULL, cols = NULL, - ..., useNames = NA) { + ..., useNames = TRUE) { # Check input type stopifnot(is(x, "DelayedMatrix")) DelayedArray:::.get_ans_type(x, must.be.numeric = TRUE) @@ -23,9 +23,11 @@ if (length(val) == 0L) { return(numeric(ncol(x))) } - # NOTE: Return value of matrixStats::colCummins() has no names - # TODO: Obey top-level `useNames` argument. - unname(do.call(cbind, val)) + val <- do.call(cbind, val) + if (!useNames) { + val <- unname(val) + } + val } ### ---------------------------------------------------------------------------- @@ -46,7 +48,7 @@ #' colCummins(dm_matrix) setMethod("colCummins", "DelayedMatrix", function(x, rows = NULL, cols = NULL, - force_block_processing = FALSE, ..., useNames = NA) { + force_block_processing = FALSE, ..., useNames = TRUE) { .smart_seed_dispatcher(x, generic = MatrixGenerics::colCummins, blockfun = .DelayedMatrix_block_colCummins, force_block_processing = force_block_processing, diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/R/colCumprods.R r-bioc-delayedmatrixstats-1.24.0+ds/R/colCumprods.R --- r-bioc-delayedmatrixstats-1.22.6+ds/R/colCumprods.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/R/colCumprods.R 2023-10-24 18:28:57.000000000 +0000 @@ -7,7 +7,7 @@ ### .DelayedMatrix_block_colCumprods <- function(x, rows = NULL, cols = NULL, - ..., useNames = NA) { + ..., useNames = TRUE) { # Check input type stopifnot(is(x, "DelayedMatrix")) DelayedArray:::.get_ans_type(x, must.be.numeric = TRUE) @@ -23,9 +23,11 @@ if (length(val) == 0L) { return(numeric(ncol(x))) } - # NOTE: Return value of matrixStats::colCumprods() has no names - # TODO: Obey top-level `useNames` argument. - unname(do.call(cbind, val)) + val <- do.call(cbind, val) + if (!useNames) { + val <- unname(val) + } + val } ### ---------------------------------------------------------------------------- @@ -46,7 +48,7 @@ #' colCumprods(dm_matrix) setMethod("colCumprods", "DelayedMatrix", function(x, rows = NULL, cols = NULL, - force_block_processing = FALSE, ..., useNames = NA) { + force_block_processing = FALSE, ..., useNames = TRUE) { .smart_seed_dispatcher(x, generic = MatrixGenerics::colCumprods, blockfun = .DelayedMatrix_block_colCumprods, force_block_processing = force_block_processing, diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/R/colCumsums.R r-bioc-delayedmatrixstats-1.24.0+ds/R/colCumsums.R --- r-bioc-delayedmatrixstats-1.22.6+ds/R/colCumsums.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/R/colCumsums.R 2023-10-24 18:28:57.000000000 +0000 @@ -7,7 +7,7 @@ ### .DelayedMatrix_block_colCumsums <- function(x, rows = NULL, cols = NULL, - ..., useNames = NA) { + ..., useNames = TRUE) { # Check input type stopifnot(is(x, "DelayedMatrix")) DelayedArray:::.get_ans_type(x, must.be.numeric = TRUE) @@ -23,9 +23,11 @@ if (length(val) == 0L) { return(numeric(ncol(x))) } - # NOTE: Return value of matrixStats::colCumsums() has no names - # TODO: Obey top-level `useNames` argument. - unname(do.call(cbind, val)) + val <- do.call(cbind, val) + if (!useNames) { + val <- unname(val) + } + val } ### ---------------------------------------------------------------------------- @@ -46,7 +48,7 @@ #' colCumsums(dm_matrix) setMethod("colCumsums", "DelayedMatrix", function(x, rows = NULL, cols = NULL, - force_block_processing = FALSE, ..., useNames = NA) { + force_block_processing = FALSE, ..., useNames = TRUE) { .smart_seed_dispatcher(x, generic = MatrixGenerics::colCumsums, blockfun = .DelayedMatrix_block_colCumsums, force_block_processing = force_block_processing, diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/R/colDiffs.R r-bioc-delayedmatrixstats-1.24.0+ds/R/colDiffs.R --- r-bioc-delayedmatrixstats-1.22.6+ds/R/colDiffs.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/R/colDiffs.R 2023-10-24 18:28:57.000000000 +0000 @@ -8,7 +8,7 @@ .DelayedMatrix_block_colDiffs <- function(x, rows = NULL, cols = NULL, lag = 1L, differences = 1L, - ..., useNames = NA) { + ..., useNames = TRUE) { # Check input type stopifnot(is(x, "DelayedMatrix")) DelayedArray:::.get_ans_type(x, must.be.numeric = TRUE) @@ -26,9 +26,11 @@ if (length(val) == 0L) { return(numeric(ncol(x))) } - # NOTE: Return value of matrixStats::colDiffs() has no names - # TODO: Obey top-level `useNames` argument. - unname(do.call(cbind, val)) + val <- do.call(cbind, val) + if (!useNames) { + val <- unname(val) + } + val } @@ -45,7 +47,6 @@ #' @rdname colDiffs #' @template common_params #' @template lowercase_x -#' @template useNamesParameter #' @export #' @template example_dm_matrix #' @template example_dm_HDF5 @@ -55,7 +56,7 @@ #' colDiffs(dm_matrix) setMethod("colDiffs", "DelayedMatrix", function(x, rows = NULL, cols = NULL, lag = 1L, differences = 1L, - force_block_processing = FALSE, ..., useNames = NA) { + force_block_processing = FALSE, ..., useNames = TRUE) { .smart_seed_dispatcher(x, generic = MatrixGenerics::colDiffs, blockfun = .DelayedMatrix_block_colDiffs, force_block_processing = force_block_processing, diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/R/colIQRDiffs.R r-bioc-delayedmatrixstats-1.24.0+ds/R/colIQRDiffs.R --- r-bioc-delayedmatrixstats-1.22.6+ds/R/colIQRDiffs.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/R/colIQRDiffs.R 2023-10-24 18:28:57.000000000 +0000 @@ -8,7 +8,7 @@ .DelayedMatrix_block_colIQRDiffs <- function(x, rows = NULL, cols = NULL, na.rm = FALSE, diff = 1L, - trim = 0, ..., useNames = NA) { + trim = 0, ..., useNames = TRUE) { # Check input type stopifnot(is(x, "DelayedMatrix")) DelayedArray:::.get_ans_type(x, must.be.numeric = TRUE) @@ -27,9 +27,7 @@ if (length(val) == 0L) { return(numeric(ncol(x))) } - # NOTE: Return value of matrixStats::colIQRDiffs() has names - # TODO: Obey top-level `useNames` argument. - unlist(val, recursive = FALSE, use.names = TRUE) + unlist(val, recursive = FALSE, use.names = useNames) } ### ---------------------------------------------------------------------------- @@ -45,7 +43,6 @@ #' @rdname colIQRDiffs #' @template common_params #' @template lowercase_x -#' @template useNamesParameter #' @export #' @template example_dm_MatrixMatrix #' @template example_dm_Rle @@ -55,7 +52,7 @@ #' colIQRDiffs(dm_Matrix) setMethod("colIQRDiffs", "DelayedMatrix", function(x, rows = NULL, cols = NULL, na.rm = FALSE, diff = 1L, - trim = 0, force_block_processing = FALSE, ..., useNames = NA) { + trim = 0, force_block_processing = FALSE, ..., useNames = TRUE) { .smart_seed_dispatcher(x, generic = MatrixGenerics::colIQRDiffs, blockfun = .DelayedMatrix_block_colIQRDiffs, force_block_processing = force_block_processing, diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/R/colIQRs.R r-bioc-delayedmatrixstats-1.24.0+ds/R/colIQRs.R --- r-bioc-delayedmatrixstats-1.22.6+ds/R/colIQRs.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/R/colIQRs.R 2023-10-24 18:28:57.000000000 +0000 @@ -7,7 +7,7 @@ ### .DelayedMatrix_block_colIQRs <- function(x, rows = NULL, cols = NULL, - na.rm = FALSE, ..., useNames = NA) { + na.rm = FALSE, ..., useNames = TRUE) { # Check input type stopifnot(is(x, "DelayedMatrix")) DelayedArray:::.get_ans_type(x, must.be.numeric = FALSE) @@ -24,9 +24,7 @@ if (length(val) == 0L) { return(numeric(ncol(x))) } - # NOTE: Return value of matrixStats::colIQRs() has no names - # TODO: Obey top-level `useNames` argument. - unlist(val, recursive = FALSE, use.names = FALSE) + unlist(val, recursive = FALSE, use.names = useNames) } ### ---------------------------------------------------------------------------- @@ -42,7 +40,6 @@ #' @rdname colIQRs #' @template common_params #' @template lowercase_x -#' @template useNamesParameter #' @export #' @template example_dm_matrix #' @template example_dm_MatrixMatrix @@ -52,7 +49,7 @@ #' colIQRs(dm_matrix) setMethod("colIQRs", "DelayedMatrix", function(x, rows = NULL, cols = NULL, na.rm = FALSE, - force_block_processing = FALSE, ..., useNames = NA) { + force_block_processing = FALSE, ..., useNames = TRUE) { .smart_seed_dispatcher(x, generic = MatrixGenerics::colIQRs, blockfun = .DelayedMatrix_block_colIQRs, force_block_processing = force_block_processing, diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/R/colLogSumExps.R r-bioc-delayedmatrixstats-1.24.0+ds/R/colLogSumExps.R --- r-bioc-delayedmatrixstats-1.22.6+ds/R/colLogSumExps.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/R/colLogSumExps.R 2023-10-24 18:28:57.000000000 +0000 @@ -8,7 +8,7 @@ .DelayedMatrix_block_colLogSumExps <- function(lx, rows = NULL, cols = NULL, na.rm = FALSE, - ..., useNames = NA) { + ..., useNames = TRUE) { # Check input type stopifnot(is(lx, "DelayedMatrix")) DelayedArray:::.get_ans_type(lx, must.be.numeric = TRUE) @@ -25,9 +25,7 @@ if (length(val) == 0L) { return(numeric(ncol(lx))) } - # NOTE: Return value of matrixStats::colLogSumExps() has names - # TODO: Obey top-level `useNames` argument. - unlist(val, recursive = FALSE, use.names = TRUE) + unlist(val, recursive = FALSE, use.names = useNames) } ### ---------------------------------------------------------------------------- @@ -43,7 +41,6 @@ #' @rdname colLogSumExps #' @template common_params #' @template lx -#' @template useNamesParameter #' @export #' @author Peter Hickey #' @examples @@ -51,7 +48,7 @@ #' colLogSumExps(log(x)) setMethod("colLogSumExps", "DelayedMatrix", function(lx, rows = NULL, cols = NULL, na.rm = FALSE, - force_block_processing = FALSE, ..., useNames = NA) { + force_block_processing = FALSE, ..., useNames = TRUE) { .smart_seed_dispatcher(lx, generic = MatrixGenerics::colLogSumExps, blockfun = .DelayedMatrix_block_colLogSumExps, force_block_processing = force_block_processing, diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/R/colMadDiffs.R r-bioc-delayedmatrixstats-1.24.0+ds/R/colMadDiffs.R --- r-bioc-delayedmatrixstats-1.22.6+ds/R/colMadDiffs.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/R/colMadDiffs.R 2023-10-24 18:28:57.000000000 +0000 @@ -8,7 +8,7 @@ .DelayedMatrix_block_colMadDiffs <- function(x, rows = NULL, cols = NULL, na.rm = FALSE, diff = 1L, - trim = 0, ..., useNames = NA) { + trim = 0, ..., useNames = TRUE) { # Check input type stopifnot(is(x, "DelayedMatrix")) DelayedArray:::.get_ans_type(x, must.be.numeric = TRUE) @@ -27,9 +27,7 @@ if (length(val) == 0L) { return(numeric(ncol(x))) } - # NOTE: Return value of matrixStats::colIQRDiffs() has names - # TODO: Obey top-level `useNames` argument. - unlist(val, recursive = FALSE, use.names = TRUE) + unlist(val, recursive = FALSE, use.names = useNames) } ### ---------------------------------------------------------------------------- @@ -50,7 +48,7 @@ #' colMadDiffs(dm_Matrix) setMethod("colMadDiffs", "DelayedMatrix", function(x, rows = NULL, cols = NULL, na.rm = FALSE, diff = 1L, - trim = 0, force_block_processing = FALSE, ..., useNames = NA) { + trim = 0, force_block_processing = FALSE, ..., useNames = TRUE) { .smart_seed_dispatcher(x, generic = MatrixGenerics::colMadDiffs, blockfun = .DelayedMatrix_block_colMadDiffs, force_block_processing = force_block_processing, diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/R/colMads.R r-bioc-delayedmatrixstats-1.24.0+ds/R/colMads.R --- r-bioc-delayedmatrixstats-1.22.6+ds/R/colMads.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/R/colMads.R 2023-10-24 18:28:57.000000000 +0000 @@ -8,7 +8,7 @@ .DelayedMatrix_block_colMads <- function(x, rows = NULL, cols = NULL, center = NULL, constant = 1.4826, - na.rm = FALSE, ..., useNames = NA) { + na.rm = FALSE, ..., useNames = TRUE) { # Check input type stopifnot(is(x, "DelayedMatrix")) DelayedArray:::.get_ans_type(x, must.be.numeric = TRUE) @@ -38,9 +38,7 @@ if (length(val) == 0L) { return(numeric(ncol(x))) } - # NOTE: Return value of matrixStats::colMads() has no names - # TODO: Obey top-level `useNames` argument. - unlist(val, recursive = FALSE, use.names = FALSE) + unlist(val, recursive = FALSE, use.names = useNames) } #' @importFrom DelayedArray currentViewport makeNindexFromArrayViewport @@ -69,7 +67,6 @@ #' @rdname colMads #' @template common_params #' @template lowercase_x -#' @template useNamesParameter #' @export #' @template example_dm_df #' @template example_dm_S4VectorsDF @@ -80,7 +77,7 @@ setMethod("colMads", "DelayedMatrix", function(x, rows = NULL, cols = NULL, center = NULL, constant = 1.4826, na.rm = FALSE, - force_block_processing = FALSE, ..., useNames = NA) { + force_block_processing = FALSE, ..., useNames = TRUE) { .smart_seed_dispatcher(x, generic = MatrixGenerics::colMads, blockfun = .DelayedMatrix_block_colMads, force_block_processing = force_block_processing, diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/R/colMeans2.R r-bioc-delayedmatrixstats-1.24.0+ds/R/colMeans2.R --- r-bioc-delayedmatrixstats-1.22.6+ds/R/colMeans2.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/R/colMeans2.R 2023-10-24 18:28:57.000000000 +0000 @@ -7,7 +7,7 @@ ### .DelayedMatrix_block_colMeans2 <- function(x, rows = NULL, cols = NULL, - na.rm = FALSE, ..., useNames = NA) { + na.rm = FALSE, ..., useNames = TRUE) { # Check input stopifnot(is(x, "DelayedMatrix")) DelayedArray:::.get_ans_type(x, must.be.numeric = TRUE) @@ -24,9 +24,7 @@ if (length(val) == 0L) { return(numeric(ncol(x))) } - # NOTE: Return value of matrixStats::colMeans2() has no names - # TODO: Obey top-level `useNames` argument. - unlist(val, recursive = FALSE, use.names = FALSE) + unlist(val, recursive = FALSE, use.names = useNames) } ### ---------------------------------------------------------------------------- @@ -42,7 +40,6 @@ #' @rdname colMeans2 #' @template common_params #' @template lowercase_x -#' @template useNamesParameter #' @export #' @template example_dm_matrix #' @template example_dm_Rle @@ -52,7 +49,7 @@ #' colMeans2(dm_matrix) setMethod("colMeans2", "DelayedMatrix", function(x, rows = NULL, cols = NULL, na.rm = FALSE, - force_block_processing = FALSE, ..., useNames = NA) { + force_block_processing = FALSE, ..., useNames = TRUE) { .smart_seed_dispatcher(x, generic = MatrixGenerics::colMeans2, blockfun = .DelayedMatrix_block_colMeans2, force_block_processing = force_block_processing, @@ -73,12 +70,14 @@ #' @export setMethod("colMeans2", "Matrix", function(x, rows = NULL, cols = NULL, na.rm = FALSE, - ..., useNames = NA) { + ..., useNames = TRUE) { message2(class(x), get_verbose()) x <- ..subset(x, rows, cols) - # NOTE: Return value of matrixStats::colMeans2() has no names - # TODO: Obey top-level `useNames` argument. - unname(colMeans(x = x, na.rm = na.rm)) + val <- colMeans(x = x, na.rm = na.rm) + if (!useNames) { + val <- unname(val) + } + val } ) @@ -87,7 +86,7 @@ #' @export setMethod("colMeans2", "SolidRleArraySeed", function(x, rows = NULL, cols = NULL, na.rm = FALSE, - ..., useNames = NA) { + ..., useNames = TRUE) { message2(class(x), get_verbose()) irl <- get_Nindex_as_IRangesList(Nindex = list(rows, cols), dim = dim(x)) @@ -98,11 +97,25 @@ } n <- length(irl[[1]]) if (n == 1) { + if (useNames) { + nms <- colnames(x) + if (!is.null(cols)) { + nms <- nms[cols] + } + names(val) <- nms + } return(val) } IDX <- rep(seq_along(irl), each = n) - # TODO: Obey top-level `useNames` argument. - unlist(lapply(X = split(val, IDX), FUN = mean, na.rm = na.rm), - use.names = FALSE) + val <- unlist( + lapply(X = split(val, IDX), FUN = mean, na.rm = na.rm)) + if (useNames) { + nms <- colnames(x) + if (!is.null(cols)) { + nms <- nms[cols] + } + names(val) <- nms + } + val } ) diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/R/colMedians.R r-bioc-delayedmatrixstats-1.24.0+ds/R/colMedians.R --- r-bioc-delayedmatrixstats-1.22.6+ds/R/colMedians.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/R/colMedians.R 2023-10-24 18:28:57.000000000 +0000 @@ -7,7 +7,7 @@ ### .DelayedMatrix_block_colMedians <- function(x, rows = NULL, cols = NULL, - na.rm = FALSE, ..., useNames = NA) { + na.rm = FALSE, ..., useNames = TRUE) { # Check input type stopifnot(is(x, "DelayedMatrix")) DelayedArray:::.get_ans_type(x, must.be.numeric = TRUE) @@ -24,9 +24,7 @@ if (length(val) == 0L) { return(numeric(ncol(x))) } - # NOTE: Return value of matrixStats::colMedians() has no names - # TODO: Obey top-level `useNames` argument. - unlist(val, recursive = FALSE, use.names = FALSE) + unlist(val, recursive = FALSE, use.names = useNames) } ### ---------------------------------------------------------------------------- @@ -42,7 +40,6 @@ #' @rdname colMedians #' @template common_params #' @template lowercase_x -#' @template useNamesParameter #' @export #' @template example_dm_MatrixMatrix #' @author Peter Hickey @@ -51,7 +48,7 @@ #' colMedians(dm_Matrix) setMethod("colMedians", "DelayedMatrix", function(x, rows = NULL, cols = NULL, na.rm = FALSE, - force_block_processing = FALSE, ..., useNames = NA) { + force_block_processing = FALSE, ..., useNames = TRUE) { .smart_seed_dispatcher(x, generic = MatrixGenerics::colMedians, blockfun = .DelayedMatrix_block_colMedians, force_block_processing = force_block_processing, diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/R/colOrderStats.R r-bioc-delayedmatrixstats-1.24.0+ds/R/colOrderStats.R --- r-bioc-delayedmatrixstats-1.22.6+ds/R/colOrderStats.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/R/colOrderStats.R 2023-10-24 18:28:57.000000000 +0000 @@ -7,7 +7,7 @@ ### .DelayedMatrix_block_colOrderStats <- function(x, rows = NULL, cols = NULL, - which, ..., useNames = NA) { + which, ..., useNames = TRUE) { # Check input type stopifnot(is(x, "DelayedMatrix")) DelayedArray:::.get_ans_type(x, must.be.numeric = TRUE) @@ -24,9 +24,7 @@ if (length(val) == 0L) { return(numeric(ncol(x))) } - # NOTE: Return value of matrixStats::colOrderStats() has no names - # TODO: Obey top-level `useNames` argument. - unlist(val, recursive = FALSE, use.names = FALSE) + unlist(val, recursive = FALSE, use.names = useNames) } ### ---------------------------------------------------------------------------- @@ -42,7 +40,6 @@ #' @rdname colOrderStats #' @template common_params #' @template lowercase_x -#' @template useNamesParameter #' @export #' @template example_dm_MatrixMatrix #' @author Peter Hickey @@ -51,7 +48,7 @@ #' colOrderStats(dm_Matrix, cols = 2:3, which = 1) setMethod("colOrderStats", "DelayedMatrix", function(x, rows = NULL, cols = NULL, which, - force_block_processing = FALSE, ..., useNames = NA) { + force_block_processing = FALSE, ..., useNames = TRUE) { .smart_seed_dispatcher(x, generic = MatrixGenerics::colOrderStats, blockfun = .DelayedMatrix_block_colOrderStats, force_block_processing = force_block_processing, diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/R/colProds.R r-bioc-delayedmatrixstats-1.24.0+ds/R/colProds.R --- r-bioc-delayedmatrixstats-1.22.6+ds/R/colProds.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/R/colProds.R 2023-10-24 18:28:57.000000000 +0000 @@ -9,7 +9,7 @@ .DelayedMatrix_block_colProds <- function(x, rows = NULL, cols = NULL, na.rm = FALSE, method = c("direct", "expSumLog"), - ..., useNames = NA) { + ..., useNames = TRUE) { # Check input method <- match.arg(method) stopifnot(is(x, "DelayedMatrix")) @@ -28,9 +28,7 @@ if (length(val) == 0L) { return(numeric(ncol(x))) } - # NOTE: Return value of matrixStats::colProds() has no names - # TODO: Obey top-level `useNames` argument. - unlist(val, recursive = FALSE, use.names = FALSE) + unlist(val, recursive = FALSE, use.names = useNames) } ### ---------------------------------------------------------------------------- @@ -46,13 +44,12 @@ #' @rdname colProds #' @template common_params #' @template lowercase_x -#' @template useNamesParameter #' @author Peter Hickey #' @export setMethod("colProds", "DelayedMatrix", function(x, rows = NULL, cols = NULL, na.rm = FALSE, method = c("direct", "expSumLog"), - force_block_processing = FALSE, ..., useNames = NA) { + force_block_processing = FALSE, ..., useNames = TRUE) { method <- match.arg(method) .smart_seed_dispatcher(x, generic = MatrixGenerics::colProds, blockfun = .DelayedMatrix_block_colProds, @@ -80,7 +77,7 @@ #' colProds(dm_matrix) setMethod("colProds", "SolidRleArraySeed", function(x, rows = NULL, cols = NULL, na.rm = FALSE, - method = c("direct", "expSumLog"), ..., useNames = NA) { + method = c("direct", "expSumLog"), ..., useNames = TRUE) { method <- match.arg(method) if (method != "direct") { stop("Only the 'direct' method is currently supported for ", @@ -92,15 +89,29 @@ views <- Views(subject = x@rle, start = unlist(irl)) val <- viewApply(X = views, FUN = prod, na.rm = na.rm) if (length(irl) == 0) { - return(numeric(ncol(x))) + return(val) } n <- length(irl[[1]]) if (n == 1) { + if (useNames) { + nms <- colnames(x) + if (!is.null(cols)) { + nms <- nms[cols] + } + names(val) <- nms + } return(val) } IDX <- rep(seq_along(irl), each = n) - # TODO: Obey top-level `useNames` argument. - unlist(lapply(X = split(val, IDX), FUN = prod, na.rm = na.rm), - use.names = FALSE) + val <- unlist( + lapply(X = split(val, IDX), FUN = prod, na.rm = na.rm)) + if (useNames) { + nms <- colnames(x) + if (!is.null(cols)) { + nms <- nms[cols] + } + names(val) <- nms + } + val } ) diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/R/colQuantiles.R r-bioc-delayedmatrixstats-1.24.0+ds/R/colQuantiles.R --- r-bioc-delayedmatrixstats-1.22.6+ds/R/colQuantiles.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/R/colQuantiles.R 2023-10-24 18:28:57.000000000 +0000 @@ -9,7 +9,7 @@ .DelayedMatrix_block_colQuantiles <- function(x, rows = NULL, cols = NULL, probs = seq(from = 0, to = 1, by = 0.25), na.rm = FALSE, type = 7L, - ..., useNames = NA, drop = TRUE) { + ..., useNames = TRUE, drop = TRUE) { # Check input type stopifnot(is(x, "DelayedMatrix")) DelayedArray:::.get_ans_type(x, must.be.numeric = FALSE) @@ -32,8 +32,9 @@ } val <- do.call(rbind, val) - # TODO: Obey top-level `useNames` argument. - rownames(val) <- colnames(x) + if (useNames) { + rownames(val) <- colnames(x) + } if (drop && any(dim(val)==1L)) { return(drop(val)) @@ -54,7 +55,6 @@ #' @rdname colQuantiles #' @template common_params #' @template lowercase_x -#' @template useNamesParameter #' @export #' @template example_dm_df #' @author Peter Hickey @@ -66,7 +66,7 @@ function(x, rows = NULL, cols = NULL, probs = seq(from = 0, to = 1, by = 0.25), na.rm = FALSE, type = 7L, force_block_processing = FALSE, ..., - useNames = NA, drop = TRUE) { + useNames = TRUE, drop = TRUE) { .smart_seed_dispatcher(x, generic = MatrixGenerics::colQuantiles, blockfun = .DelayedMatrix_block_colQuantiles, force_block_processing = force_block_processing, @@ -74,7 +74,7 @@ cols = cols, probs = probs, na.rm = na.rm, - # type = type, # TODO: wait for SMS to fix. + type = type, ..., useNames = useNames, drop = drop) diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/R/colRanks.R r-bioc-delayedmatrixstats-1.24.0+ds/R/colRanks.R --- r-bioc-delayedmatrixstats-1.22.6+ds/R/colRanks.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/R/colRanks.R 2023-10-24 18:28:57.000000000 +0000 @@ -9,7 +9,7 @@ .DelayedMatrix_block_colRanks <- function(x, rows = NULL, cols = NULL, ties.method = c("max", "average", "first", "last", "random", "max", "min", "dense"), - preserveShape = FALSE, ..., useNames = NA) { + preserveShape = FALSE, ..., useNames = TRUE) { # Check input type ties.method <- match.arg(ties.method) stopifnot(is(x, "DelayedMatrix")) @@ -28,9 +28,11 @@ if (length(val) == 0L) { return(numeric(ncol(x))) } - # NOTE: Return value of matrixStats::colRanks() has no names - # TODO: Obey top-level `useNames` argument. - unname(do.call(rbind, val)) + val <- do.call(rbind, val) + if (!useNames) { + val <- unname(val) + } + val } ### ---------------------------------------------------------------------------- @@ -46,7 +48,6 @@ #' @rdname colRanks #' @template common_params #' @template lowercase_x -#' @template useNamesParameter #' @export #' @template example_dm_MatrixMatrix #' @author Peter Hickey @@ -57,7 +58,7 @@ function(x, rows = NULL, cols = NULL, ties.method = c("max", "average", "first", "last", "random", "max", "min", "dense"), preserveShape = FALSE, - force_block_processing = FALSE, ..., useNames = useNames) { + force_block_processing = FALSE, ..., useNames = TRUE) { ties.method <- match.arg(ties.method) .smart_seed_dispatcher(x, generic = MatrixGenerics::colRanks, blockfun = .DelayedMatrix_block_colRanks, @@ -65,7 +66,7 @@ rows = rows, cols = cols, ties.method = ties.method, - # preserveShape = preserveShape, # TODO: wait for a fix in SMS. + preserveShape = preserveShape, ..., useNames = useNames) } diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/R/colSdDiffs.R r-bioc-delayedmatrixstats-1.24.0+ds/R/colSdDiffs.R --- r-bioc-delayedmatrixstats-1.22.6+ds/R/colSdDiffs.R 2023-08-09 18:04:32.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/R/colSdDiffs.R 2023-10-24 18:28:57.000000000 +0000 @@ -8,7 +8,7 @@ .DelayedMatrix_block_colSdDiffs <- function(x, rows = NULL, cols = NULL, na.rm = FALSE, diff = 1L, - trim = 0, ..., useNames = NA) { + trim = 0, ..., useNames = TRUE) { # Check input type stopifnot(is(x, "DelayedMatrix")) DelayedArray:::.get_ans_type(x, must.be.numeric = TRUE) @@ -27,9 +27,7 @@ if (length(val) == 0L) { return(numeric(ncol(x))) } - # NOTE: Return value of matrixStats::colSdDiffs() has names - # TODO: Obey top-level `useNames` argument. - unlist(val, recursive = FALSE, use.names = TRUE) + unlist(val, recursive = FALSE, use.names = useNames) } ### ---------------------------------------------------------------------------- @@ -50,7 +48,7 @@ #' colSdDiffs(dm_Matrix) setMethod("colSdDiffs", "DelayedMatrix", function(x, rows = NULL, cols = NULL, na.rm = FALSE, diff = 1L, - trim = 0, force_block_processing = FALSE, ..., useNames = NA) { + trim = 0, force_block_processing = FALSE, ..., useNames = TRUE) { .smart_seed_dispatcher(x, generic = MatrixGenerics::colSdDiffs, blockfun = .DelayedMatrix_block_colSdDiffs, force_block_processing = force_block_processing, diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/R/colSds.R r-bioc-delayedmatrixstats-1.24.0+ds/R/colSds.R --- r-bioc-delayedmatrixstats-1.22.6+ds/R/colSds.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/R/colSds.R 2023-10-24 18:28:57.000000000 +0000 @@ -21,7 +21,7 @@ setMethod("colSds", "DelayedMatrix", function(x, rows = NULL, cols = NULL, na.rm = FALSE, center = NULL, force_block_processing = FALSE, - ..., useNames = NA) { + ..., useNames = TRUE) { sqrt(colVars(x = x, rows = rows, cols = cols, diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/R/colSums2.R r-bioc-delayedmatrixstats-1.24.0+ds/R/colSums2.R --- r-bioc-delayedmatrixstats-1.22.6+ds/R/colSums2.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/R/colSums2.R 2023-10-24 18:28:57.000000000 +0000 @@ -7,7 +7,7 @@ ### .DelayedMatrix_block_colSums2 <- function(x, rows = NULL, cols = NULL, - na.rm = FALSE, ..., useNames = NA) { + na.rm = FALSE, ..., useNames = TRUE) { # Check input stopifnot(is(x, "DelayedMatrix")) DelayedArray:::.get_ans_type(x, must.be.numeric = TRUE) @@ -24,9 +24,7 @@ if (length(val) == 0L) { return(numeric(ncol(x))) } - # NOTE: Return value of matrixStats::colSums2() has no names - # TODO: Obey top-level `useNames` argument. - unlist(val, recursive = FALSE, use.names = FALSE) + unlist(val, recursive = FALSE, use.names = useNames) } ### ---------------------------------------------------------------------------- @@ -42,7 +40,6 @@ #' @rdname colSums2 #' @template common_params #' @template lowercase_x -#' @template useNamesParameter #' @export #' @template example_dm_matrix #' @template example_dm_MatrixMatrix @@ -52,7 +49,7 @@ #' colSums2(dm_matrix) setMethod("colSums2", "DelayedMatrix", function(x, rows = NULL, cols = NULL, na.rm = FALSE, - force_block_processing = FALSE, ..., useNames = NA) { + force_block_processing = FALSE, ..., useNames = TRUE) { .smart_seed_dispatcher(x, generic = MatrixGenerics::colSums2, blockfun = .DelayedMatrix_block_colSums2, force_block_processing = force_block_processing, @@ -73,12 +70,14 @@ #' @export setMethod("colSums2", "Matrix", function(x, rows = NULL, cols = NULL, na.rm = FALSE, - ..., useNames = NA) { + ..., useNames = TRUE) { message2(class(x), get_verbose()) x <- ..subset(x, rows, cols) - # NOTE: Return value of matrixStats::colSums2() has no names - # TODO: Obey top-level `useNames` argument. - unname(colSums(x = x, na.rm = na.rm)) + val <- colSums(x = x, na.rm = na.rm) + if (!useNames) { + val <- unname(val) + } + val } ) @@ -87,7 +86,7 @@ #' @export setMethod("colSums2", "SolidRleArraySeed", function(x, rows = NULL, cols = NULL, na.rm = FALSE, - ..., useNames = NA) { + ..., useNames = TRUE) { message2(class(x), get_verbose()) irl <- get_Nindex_as_IRangesList(Nindex = list(rows, cols), dim = dim(x)) @@ -98,11 +97,25 @@ } n <- length(irl[[1]]) if (n == 1) { + if (useNames) { + nms <- colnames(x) + if (!is.null(cols)) { + nms <- nms[cols] + } + names(val) <- nms + } return(val) } IDX <- rep(seq_along(irl), each = n) - # TODO: Obey top-level `useNames` argument. - unlist(lapply(X = split(val, IDX), FUN = sum, na.rm = na.rm), - use.names = FALSE) + val <- unlist( + lapply(X = split(val, IDX), FUN = sum, na.rm = na.rm)) + if (useNames) { + nms <- colnames(x) + if (!is.null(cols)) { + nms <- nms[cols] + } + names(val) <- nms + } + val } ) diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/R/colTabulates.R r-bioc-delayedmatrixstats-1.24.0+ds/R/colTabulates.R --- r-bioc-delayedmatrixstats-1.22.6+ds/R/colTabulates.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/R/colTabulates.R 2023-10-24 18:28:57.000000000 +0000 @@ -7,7 +7,7 @@ ### .DelayedMatrix_block_colTabulates <- function(x, rows = NULL, cols = NULL, - values = NULL, ..., useNames = NA) { + values = NULL, ..., useNames = TRUE) { # Check input type stopifnot(is(x, "DelayedMatrix")) DelayedArray:::.get_ans_type(x, must.be.numeric = FALSE) @@ -35,9 +35,11 @@ if (length(val) == 0L) { return(matrix(0L,0,0)) } - # NOTE: Return value of matrixStats::colTabulates() has names - # TODO: Obey top-level `useNames` argument. - do.call(rbind, val) + val <- do.call(rbind, val) + if (!useNames) { + val <- unname(val) + } + val } ### ---------------------------------------------------------------------------- @@ -54,7 +56,6 @@ #' @rdname colTabulates #' @template common_params #' @template lowercase_x -#' @template useNamesParameter #' @export #' @template example_dm_S4VectorsDF #' @author Peter Hickey @@ -63,7 +64,7 @@ #' colTabulates(dm_DF) setMethod("colTabulates", "DelayedMatrix", function(x, rows = NULL, cols = NULL, values = NULL, - force_block_processing = FALSE, ..., useNames = NA) { + force_block_processing = FALSE, ..., useNames = TRUE) { if (!type(x) %in% c("integer", "logical", "raw")) { stop("Argument 'x' is not of type integer, logical, or raw", " (type = ", type(x), ")") diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/R/colVarDiffs.R r-bioc-delayedmatrixstats-1.24.0+ds/R/colVarDiffs.R --- r-bioc-delayedmatrixstats-1.22.6+ds/R/colVarDiffs.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/R/colVarDiffs.R 2023-10-24 18:28:57.000000000 +0000 @@ -8,7 +8,7 @@ .DelayedMatrix_block_colVarDiffs <- function(x, rows = NULL, cols = NULL, na.rm = FALSE, diff = 1L, - trim = 0, ..., useNames = NA) { + trim = 0, ..., useNames = TRUE) { # Check input type stopifnot(is(x, "DelayedMatrix")) DelayedArray:::.get_ans_type(x, must.be.numeric = TRUE) @@ -27,9 +27,7 @@ if (length(val) == 0L) { return(numeric(ncol(x))) } - # NOTE: Return value of matrixStats::colVarDiffs() has names - # TODO: Obey top-level `useNames` argument. - unlist(val, recursive = FALSE, use.names = TRUE) + unlist(val, recursive = FALSE, use.names = useNames) } ### ---------------------------------------------------------------------------- @@ -50,7 +48,7 @@ #' colVarDiffs(dm_Matrix) setMethod("colVarDiffs", "DelayedMatrix", function(x, rows = NULL, cols = NULL, na.rm = FALSE, diff = 1L, - trim = 0, force_block_processing = FALSE, ..., useNames = NA) { + trim = 0, force_block_processing = FALSE, ..., useNames = TRUE) { .smart_seed_dispatcher(x, generic = MatrixGenerics::colVarDiffs, blockfun = .DelayedMatrix_block_colVarDiffs, force_block_processing = force_block_processing, diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/R/colVars.R r-bioc-delayedmatrixstats-1.24.0+ds/R/colVars.R --- r-bioc-delayedmatrixstats-1.22.6+ds/R/colVars.R 2023-08-28 18:04:43.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/R/colVars.R 2023-10-24 18:28:57.000000000 +0000 @@ -8,7 +8,7 @@ .DelayedMatrix_block_colVars <- function(x, rows = NULL, cols = NULL, na.rm = FALSE, center = NULL, - ..., useNames = NA) { + ..., useNames = TRUE) { # Check input type stopifnot(is(x, "DelayedMatrix")) DelayedArray:::.get_ans_type(x, must.be.numeric = TRUE) @@ -48,7 +48,6 @@ #' @rdname colVars #' @template common_params #' @template lowercase_x -#' @template useNamesParameter #' @export #' @template example_dm_matrix #' @template example_dm_HDF5 @@ -58,7 +57,7 @@ #' colVars(dm_matrix) setMethod("colVars", "DelayedMatrix", function(x, rows = NULL, cols = NULL, na.rm = FALSE, center = NULL, - force_block_processing = FALSE, ..., useNames = NA) { + force_block_processing = FALSE, ..., useNames = TRUE) { .smart_seed_dispatcher(x, generic = MatrixGenerics::colVars, blockfun = .DelayedMatrix_block_colVars, force_block_processing = force_block_processing, diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/R/colWeightedMads.R r-bioc-delayedmatrixstats-1.24.0+ds/R/colWeightedMads.R --- r-bioc-delayedmatrixstats-1.22.6+ds/R/colWeightedMads.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/R/colWeightedMads.R 2023-10-24 18:28:57.000000000 +0000 @@ -9,7 +9,7 @@ .DelayedMatrix_block_colWeightedMads <- function(x, w = NULL, rows = NULL, cols = NULL, na.rm = FALSE, constant = 1.4826, - center = NULL, ..., useNames = NA) { + center = NULL, ..., useNames = TRUE) { # Check input type stopifnot(is(x, "DelayedMatrix")) DelayedArray:::.get_ans_type(x, must.be.numeric = FALSE) @@ -51,9 +51,7 @@ if (length(val) == 0L) { return(numeric(ncol(x))) } - # NOTE: Return value of matrixStats::colWeightedMads() has names - # TODO: Obey top-level `useNames` argument. - unlist(val, recursive = FALSE, use.names = TRUE) + unlist(val, recursive = FALSE, use.names = useNames) } #' @importFrom DelayedArray currentViewport makeNindexFromArrayViewport @@ -82,7 +80,6 @@ #' @rdname colWeightedMads #' @template common_params #' @template lowercase_x -#' @template useNamesParameter #' @export #' @template example_dm_matrix #' @author Peter Hickey @@ -92,7 +89,7 @@ setMethod("colWeightedMads", "DelayedMatrix", function(x, w = NULL, rows = NULL, cols = NULL, na.rm = FALSE, constant = 1.4826, center = NULL, - force_block_processing = FALSE, ..., useNames = NA) { + force_block_processing = FALSE, ..., useNames = TRUE) { .smart_seed_dispatcher(x, generic = MatrixGenerics::colWeightedMads, blockfun = .DelayedMatrix_block_colWeightedMads, force_block_processing = force_block_processing, diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/R/colWeightedMeans.R r-bioc-delayedmatrixstats-1.24.0+ds/R/colWeightedMeans.R --- r-bioc-delayedmatrixstats-1.22.6+ds/R/colWeightedMeans.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/R/colWeightedMeans.R 2023-10-24 18:28:57.000000000 +0000 @@ -8,7 +8,7 @@ .DelayedMatrix_block_colWeightedMeans <- function(x, w = NULL, rows = NULL, cols = NULL, na.rm = FALSE, - ..., useNames = NA) { + ..., useNames = TRUE) { # Check input type stopifnot(is(x, "DelayedMatrix")) DelayedArray:::.get_ans_type(x, must.be.numeric = FALSE) @@ -37,9 +37,7 @@ if (length(val) == 0L) { return(numeric(ncol(x))) } - # NOTE: Return value of matrixStats::colWeightedMeans() has names - # TODO: Obey top-level `useNames` argument. - unlist(val, recursive = FALSE, use.names = TRUE) + unlist(val, recursive = FALSE, use.names = useNames) } ### ---------------------------------------------------------------------------- @@ -55,7 +53,6 @@ #' @rdname colWeightedMeans #' @template common_params #' @template lowercase_x -#' @template useNamesParameter #' @export #' @template example_dm_MatrixMatrix #' @author Peter Hickey @@ -66,7 +63,7 @@ #' colWeightedMeans(dm_Matrix, w = 1 / rowVars(dm_Matrix)) setMethod("colWeightedMeans", "DelayedMatrix", function(x, w = NULL, rows = NULL, cols = NULL, na.rm = FALSE, - force_block_processing = FALSE, ..., useNames = NA) { + force_block_processing = FALSE, ..., useNames = TRUE) { .smart_seed_dispatcher(x, generic = MatrixGenerics::colWeightedMeans, blockfun = .DelayedMatrix_block_colWeightedMeans, force_block_processing = force_block_processing, diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/R/colWeightedMedians.R r-bioc-delayedmatrixstats-1.24.0+ds/R/colWeightedMedians.R --- r-bioc-delayedmatrixstats-1.22.6+ds/R/colWeightedMedians.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/R/colWeightedMedians.R 2023-10-24 18:28:57.000000000 +0000 @@ -8,7 +8,7 @@ .DelayedMatrix_block_colWeightedMedians <- function(x, w = NULL, rows = NULL, cols = NULL, na.rm = FALSE, - ..., useNames = NA) { + ..., useNames = TRUE) { # Check input type stopifnot(is(x, "DelayedMatrix")) DelayedArray:::.get_ans_type(x, must.be.numeric = TRUE) @@ -37,9 +37,7 @@ if (length(val) == 0L) { return(numeric(ncol(x))) } - # NOTE: Return value of matrixStats::colWeightedMedians() has names - # TODO: Obey top-level `useNames` argument. - unlist(val, recursive = FALSE, use.names = TRUE) + unlist(val, recursive = FALSE, use.names = useNames) } ### ---------------------------------------------------------------------------- @@ -55,7 +53,6 @@ #' @rdname colWeightedMedians #' @template common_params #' @template lowercase_x -#' @template useNamesParameter #' @export #' @template example_dm_Rle #' @author Peter Hickey @@ -65,7 +62,7 @@ #' colWeightedMedians(dm_Rle, w = 1 / rowMads(dm_Rle)) setMethod("colWeightedMedians", "DelayedMatrix", function(x, w = NULL, rows = NULL, cols = NULL, na.rm = FALSE, - force_block_processing = FALSE, ..., useNames = NA) { + force_block_processing = FALSE, ..., useNames = TRUE) { .smart_seed_dispatcher(x, generic = MatrixGenerics::colWeightedMedians, blockfun = .DelayedMatrix_block_colWeightedMedians, force_block_processing = force_block_processing, diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/R/colWeightedSds.R r-bioc-delayedmatrixstats-1.24.0+ds/R/colWeightedSds.R --- r-bioc-delayedmatrixstats-1.22.6+ds/R/colWeightedSds.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/R/colWeightedSds.R 2023-10-24 18:28:57.000000000 +0000 @@ -21,7 +21,7 @@ #' colWeightedSds(dm_Rle, w = 1 / rowMeans2(dm_Rle)) setMethod("colWeightedSds", "DelayedMatrix", function(x, w = NULL, rows = NULL, cols = NULL, na.rm = FALSE, - force_block_processing = FALSE, ..., useNames = NA) { + force_block_processing = FALSE, ..., useNames = TRUE) { sqrt(colWeightedVars( x = x, w = w, diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/R/colWeightedVars.R r-bioc-delayedmatrixstats-1.24.0+ds/R/colWeightedVars.R --- r-bioc-delayedmatrixstats-1.22.6+ds/R/colWeightedVars.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/R/colWeightedVars.R 2023-10-24 18:28:57.000000000 +0000 @@ -8,7 +8,7 @@ .DelayedMatrix_block_colWeightedVars <- function(x, w = NULL, rows = NULL, cols = NULL, na.rm = FALSE, - ..., useNames = NA) { + ..., useNames = TRUE) { # Check input type stopifnot(is(x, "DelayedMatrix")) DelayedArray:::.get_ans_type(x, must.be.numeric = TRUE) @@ -37,9 +37,7 @@ if (length(val) == 0L) { return(numeric(ncol(x))) } - # NOTE: Return value of matrixStats::colWeightedVars() has names - # TODO: Obey top-level `useNames` argument. - unlist(val, recursive = FALSE, use.names = TRUE) + unlist(val, recursive = FALSE, use.names = useNames) } ### ---------------------------------------------------------------------------- @@ -55,7 +53,6 @@ #' @rdname colWeightedVars #' @template common_params #' @template lowercase_x -#' @template useNamesParameter #' @export #' @author Peter Hickey #' @examples @@ -64,7 +61,7 @@ #' colWeightedVars(dm_Rle, w = 1 / rowMeans2(dm_Rle)) setMethod("colWeightedVars", "DelayedMatrix", function(x, w = NULL, rows = NULL, cols = NULL, na.rm = FALSE, - force_block_processing = FALSE, ..., useNames = NA) { + force_block_processing = FALSE, ..., useNames = TRUE) { .smart_seed_dispatcher(x, generic = MatrixGenerics::colWeightedVars, blockfun = .DelayedMatrix_block_colWeightedVars, force_block_processing = force_block_processing, diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/R/rowAlls.R r-bioc-delayedmatrixstats-1.24.0+ds/R/rowAlls.R --- r-bioc-delayedmatrixstats-1.22.6+ds/R/rowAlls.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/R/rowAlls.R 2023-10-24 18:28:57.000000000 +0000 @@ -8,7 +8,7 @@ .DelayedMatrix_block_rowAlls <- function(x, rows = NULL, cols = NULL, value = TRUE, na.rm = FALSE, - ..., useNames = NA) { + ..., useNames = TRUE) { # Check input stopifnot(is(x, "DelayedMatrix")) DelayedArray:::.get_ans_type(x, must.be.numeric = FALSE) @@ -26,9 +26,7 @@ if (length(val) == 0L) { return(logical(ncol(x))) } - # NOTE: Return value of matrixStats::rowAlls() has no names - # TODO: Obey top-level `useNames` argument. - unlist(val, recursive = FALSE, use.names = FALSE) + unlist(val, recursive = FALSE, use.names = useNames) } ### ---------------------------------------------------------------------------- @@ -47,7 +45,7 @@ #' rowAlls(dm_Rle, value = 1) setMethod("rowAlls", "DelayedMatrix", function(x, rows = NULL, cols = NULL, value = TRUE, na.rm = FALSE, - force_block_processing = FALSE, ..., useNames = NA) { + force_block_processing = FALSE, ..., useNames = TRUE) { .smart_seed_dispatcher(x, generic = MatrixGenerics::rowAlls, blockfun = .DelayedMatrix_block_rowAlls, force_block_processing = force_block_processing, diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/R/rowAnyMissings.R r-bioc-delayedmatrixstats-1.24.0+ds/R/rowAnyMissings.R --- r-bioc-delayedmatrixstats-1.22.6+ds/R/rowAnyMissings.R 2023-06-09 18:04:41.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/R/rowAnyMissings.R 2023-10-24 18:28:57.000000000 +0000 @@ -10,13 +10,11 @@ # General method # -#' @inherit matrixStats::rowAnyMissings -#' @importMethodsFrom DelayedArray seed -#' @rdname colAnyNAs +#' @rdname DelayedMatrixStats-deprecated #' @export setMethod("rowAnyMissings", "DelayedMatrix", function(x, rows = NULL, cols = NULL, force_block_processing = FALSE, - ..., useNames = NA) { + ..., useNames = TRUE) { rowAnyNAs(x = x, rows = rows, cols = cols, @@ -30,9 +28,10 @@ # Seed-aware methods # +#' @rdname DelayedMatrixStats-deprecated #' @export setMethod("rowAnyMissings", "matrix", - function(x, rows = NULL, cols = NULL, ..., useNames = NA) { + function(x, rows = NULL, cols = NULL, ..., useNames = TRUE) { rowAnyNAs(x = x, rows = rows, cols = cols, diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/R/rowAnyNAs.R r-bioc-delayedmatrixstats-1.24.0+ds/R/rowAnyNAs.R --- r-bioc-delayedmatrixstats-1.22.6+ds/R/rowAnyNAs.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/R/rowAnyNAs.R 2023-10-24 18:28:57.000000000 +0000 @@ -6,7 +6,7 @@ ### Exported methods ### -.DelayedMatrix_block_rowAnyNAs <- function(x, rows, cols, ..., useNames = NA) { +.DelayedMatrix_block_rowAnyNAs <- function(x, rows, cols, ..., useNames = TRUE) { rowAnys(x = x, rows = rows, cols = cols, value = NA, ..., useNames = useNames) } @@ -20,7 +20,7 @@ #' @export setMethod("rowAnyNAs", "DelayedMatrix", function(x, rows = NULL, cols = NULL, force_block_processing = FALSE, - ..., useNames = NA) { + ..., useNames = TRUE) { .smart_seed_dispatcher(x, generic = MatrixGenerics::rowAnyNAs, blockfun = .DelayedMatrix_block_rowAnyNAs, force_block_processing = force_block_processing, diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/R/rowAnys.R r-bioc-delayedmatrixstats-1.24.0+ds/R/rowAnys.R --- r-bioc-delayedmatrixstats-1.22.6+ds/R/rowAnys.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/R/rowAnys.R 2023-10-24 18:28:57.000000000 +0000 @@ -8,11 +8,10 @@ .DelayedMatrix_block_rowAnys <- function(x, rows = NULL, cols = NULL, value = TRUE, na.rm = FALSE, - ..., useNames = NA) { + ..., useNames = TRUE) { # Check input stopifnot(is(x, "DelayedMatrix")) - # TODO: Answer is always logical, so this might not be appropriate - DelayedArray:::.get_ans_type(x, must.be.numeric = TRUE) + DelayedArray:::.get_ans_type(x, must.be.numeric = FALSE) # Subset x <- ..subset(x, rows, cols) @@ -27,9 +26,7 @@ if (length(val) == 0L) { return(logical(ncol(x))) } - # NOTE: Return value of matrixStats::rowAnys() has no names - # TODO: Obey top-level `useNames` argument. - unlist(val, recursive = FALSE, use.names = FALSE) + unlist(val, recursive = FALSE, use.names = useNames) } ### ---------------------------------------------------------------------------- @@ -48,7 +45,7 @@ #' rowAnys(dm_Rle, value = 2) setMethod("rowAnys", "DelayedMatrix", function(x, rows = NULL, cols = NULL, value = TRUE, na.rm = FALSE, - force_block_processing = FALSE, ..., useNames = NA) { + force_block_processing = FALSE, ..., useNames = TRUE) { .smart_seed_dispatcher(x, generic = MatrixGenerics::rowAnys, blockfun = .DelayedMatrix_block_rowAnys, force_block_processing = force_block_processing, diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/R/rowAvgsPerColSet.R r-bioc-delayedmatrixstats-1.24.0+ds/R/rowAvgsPerColSet.R --- r-bioc-delayedmatrixstats-1.22.6+ds/R/rowAvgsPerColSet.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/R/rowAvgsPerColSet.R 2023-10-24 18:28:57.000000000 +0000 @@ -33,17 +33,16 @@ if (!is.null(W)) { W <- W[, k] } - matrixStats::rowAvgsPerColSet(as.matrix(X[, S[, k], drop = FALSE]), - W = W, - S = matrix(seq_len(nrow(S))), - FUN = FUN, - na.rm = na.rm, - tFUN = tFUN) + rowAvgsPerColSet(as.matrix(X[, S[, k], drop = FALSE]), + W = W, + S = matrix(seq_len(nrow(S))), + FUN = FUN, + na.rm = na.rm, + tFUN = tFUN) }) if (length(val) == 0L) { return(matrix(numeric(ncol(X)), ncol = ncol(X))) } - # NOTE: Return value of matrixStats::rowAvgsPerColSet() has rownames do.call(cbind, val) } @@ -65,7 +64,7 @@ setMethod("rowAvgsPerColSet", "DelayedMatrix", function(X, W = NULL, rows = NULL, S, FUN = rowMeans, ..., force_block_processing = FALSE, na.rm = NA, tFUN = FALSE) { - .smart_seed_dispatcher(X, generic = MatrixGenerics::rowAvgsPerColSet, + .smart_seed_dispatcher(X, generic = MatrixGenerics::rowAvgsPerColSet, blockfun = .DelayedMatrix_block_rowAvgsPerColSet, force_block_processing = force_block_processing, W = W, diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/R/rowCollapse.R r-bioc-delayedmatrixstats-1.24.0+ds/R/rowCollapse.R --- r-bioc-delayedmatrixstats-1.22.6+ds/R/rowCollapse.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/R/rowCollapse.R 2023-10-24 18:28:57.000000000 +0000 @@ -8,7 +8,7 @@ #' @importMethodsFrom DelayedArray t .DelayedMatrix_block_rowCollapse <- function(x, idxs, rows = NULL, - ..., useNames = NA) { + ..., useNames = TRUE) { # Check input stopifnot(is(x, "DelayedMatrix")) DelayedArray:::.get_ans_type(x, must.be.numeric = FALSE) @@ -29,20 +29,18 @@ if (length(val) == 0L) { return(numeric(nrow(x))) } - # NOTE: Return value of matrixStats::rowCollapse() has no names - # TODO: Obey top-level `useNames` argument. - unlist(val, recursive = TRUE, use.names = FALSE) + unlist(val, recursive = FALSE, use.names = useNames) } #' @importFrom DelayedArray currentViewport makeNindexFromArrayViewport -.rowCollapse_internal <- function(x, idxs, ..., useNames = NA) { +.rowCollapse_internal <- function(x, idxs, ..., useNames = TRUE) { block.env <- parent.frame(2) vp <- currentViewport(block.env) subset <- makeNindexFromArrayViewport(vp)[[1]] if (!is.null(subset)) { idxs <- idxs[as.integer(subset)] } - matrixStats::rowCollapse(x, idxs, ..., useNames = useNames) + rowCollapse(x, idxs, ..., useNames = useNames) } ### ---------------------------------------------------------------------------- @@ -66,7 +64,7 @@ #' rowCollapse(dm_HDF5, 2) setMethod("rowCollapse", "DelayedMatrix", function(x, idxs, rows = NULL, - force_block_processing = FALSE, ..., useNames = NA) { + force_block_processing = FALSE, ..., useNames = TRUE) { .smart_seed_dispatcher(x, generic = MatrixGenerics::rowCollapse, blockfun = .DelayedMatrix_block_rowCollapse, force_block_processing = force_block_processing, diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/R/rowCounts.R r-bioc-delayedmatrixstats-1.24.0+ds/R/rowCounts.R --- r-bioc-delayedmatrixstats-1.22.6+ds/R/rowCounts.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/R/rowCounts.R 2023-10-24 18:28:57.000000000 +0000 @@ -8,7 +8,7 @@ .DelayedMatrix_block_rowCounts <- function(x, rows = NULL, cols = NULL, value = TRUE, na.rm = FALSE, - ..., useNames = NA) { + ..., useNames = TRUE) { # Check input type stopifnot(is(x, "DelayedMatrix")) DelayedArray:::.get_ans_type(x, must.be.numeric = FALSE) @@ -26,9 +26,7 @@ if (length(val) == 0L) { return(numeric(ncol(x))) } - # NOTE: Return value of matrixStats::rowCounts() has no names - # TODO: Obey top-level `useNames` argument. - unlist(val, recursive = FALSE, use.names = FALSE) + unlist(val, recursive = FALSE, use.names = useNames) } ### ---------------------------------------------------------------------------- @@ -50,7 +48,7 @@ #' rowCounts(dm_DF, rows = seq(1, nrow(dm_DF), 2), cols = 2, value = 5) setMethod("rowCounts", "DelayedMatrix", function(x, rows = NULL, cols = NULL, value = TRUE, na.rm = FALSE, - force_block_processing = FALSE, ..., useNames = NA) { + force_block_processing = FALSE, ..., useNames = TRUE) { .smart_seed_dispatcher(x, generic = MatrixGenerics::rowCounts, blockfun = .DelayedMatrix_block_rowCounts, force_block_processing = force_block_processing, diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/R/rowCummaxs.R r-bioc-delayedmatrixstats-1.24.0+ds/R/rowCummaxs.R --- r-bioc-delayedmatrixstats-1.22.6+ds/R/rowCummaxs.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/R/rowCummaxs.R 2023-10-24 18:28:57.000000000 +0000 @@ -7,7 +7,7 @@ ### .DelayedMatrix_block_rowCummaxs <- function(x, rows = NULL, cols = NULL, - ..., useNames = NA) { + ..., useNames = TRUE) { # Check input type stopifnot(is(x, "DelayedMatrix")) DelayedArray:::.get_ans_type(x, must.be.numeric = TRUE) @@ -23,9 +23,11 @@ if (length(val) == 0L) { return(numeric(ncol(x))) } - # NOTE: Return value of matrixStats::rowCummaxs() has no names - # TODO: Obey top-level `useNames` argument. - unname(do.call(rbind, val)) + val <- do.call(rbind, val) + if (!useNames) { + val <- unname(val) + } + val } ### ---------------------------------------------------------------------------- @@ -46,7 +48,7 @@ #' rowCummaxs(dm_Matrix, rows = 2:4) setMethod("rowCummaxs", "DelayedMatrix", function(x, rows = NULL, cols = NULL, - force_block_processing = FALSE, ..., useNames = NA) { + force_block_processing = FALSE, ..., useNames = TRUE) { .smart_seed_dispatcher(x, generic = MatrixGenerics::rowCummaxs, blockfun = .DelayedMatrix_block_rowCummaxs, force_block_processing = force_block_processing, diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/R/rowCummins.R r-bioc-delayedmatrixstats-1.24.0+ds/R/rowCummins.R --- r-bioc-delayedmatrixstats-1.22.6+ds/R/rowCummins.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/R/rowCummins.R 2023-10-24 18:28:57.000000000 +0000 @@ -7,7 +7,7 @@ ### .DelayedMatrix_block_rowCummins <- function(x, rows = NULL, cols = NULL, - ..., useNames = NA) { + ..., useNames = TRUE) { # Check input type stopifnot(is(x, "DelayedMatrix")) DelayedArray:::.get_ans_type(x, must.be.numeric = TRUE) @@ -23,8 +23,11 @@ if (length(val) == 0L) { return(numeric(ncol(x))) } - # NOTE: Return value of matrixStats::rowCummins() has no names - unname(do.call(rbind, val)) + val <- do.call(cbind, val) + if (!useNames) { + val <- unname(val) + } + val } ### ---------------------------------------------------------------------------- @@ -45,7 +48,7 @@ #' rowCummins(dm_Matrix, rows = 2:4) setMethod("rowCummins", "DelayedMatrix", function(x, rows = NULL, cols = NULL, - force_block_processing = FALSE, ..., useNames = NA) { + force_block_processing = FALSE, ..., useNames = TRUE) { .smart_seed_dispatcher(x, generic = MatrixGenerics::rowCummins, blockfun = .DelayedMatrix_block_rowCummins, force_block_processing = force_block_processing, diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/R/rowCumprods.R r-bioc-delayedmatrixstats-1.24.0+ds/R/rowCumprods.R --- r-bioc-delayedmatrixstats-1.22.6+ds/R/rowCumprods.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/R/rowCumprods.R 2023-10-24 18:28:57.000000000 +0000 @@ -7,7 +7,7 @@ ### .DelayedMatrix_block_rowCumprods <- function(x, rows = NULL, cols = NULL, - ..., useNames = NA) { + ..., useNames = TRUE) { # Check input type stopifnot(is(x, "DelayedMatrix")) DelayedArray:::.get_ans_type(x, must.be.numeric = TRUE) @@ -23,9 +23,11 @@ if (length(val) == 0L) { return(numeric(ncol(x))) } - # NOTE: Return value of matrixStats::rowCumprods() has no names - # TODO: Obey top-level `useNames` argument. - unname(do.call(rbind, val)) + val <- do.call(rbind, val) + if (!useNames) { + val <- unname(val) + } + val } ### ---------------------------------------------------------------------------- @@ -46,7 +48,7 @@ #' rowCumprods(dm_Matrix, rows = 2:4) setMethod("rowCumprods", "DelayedMatrix", function(x, rows = NULL, cols = NULL, - force_block_processing = FALSE, ..., useNames = NA) { + force_block_processing = FALSE, ..., useNames = TRUE) { .smart_seed_dispatcher(x, generic = MatrixGenerics::rowCumprods, blockfun = .DelayedMatrix_block_rowCumprods, force_block_processing = force_block_processing, diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/R/rowCumsums.R r-bioc-delayedmatrixstats-1.24.0+ds/R/rowCumsums.R --- r-bioc-delayedmatrixstats-1.22.6+ds/R/rowCumsums.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/R/rowCumsums.R 2023-10-24 18:28:57.000000000 +0000 @@ -7,7 +7,7 @@ ### .DelayedMatrix_block_rowCumsums <- function(x, rows = NULL, cols = NULL, - ..., useNames = NA) { + ..., useNames = TRUE) { # Check input type stopifnot(is(x, "DelayedMatrix")) DelayedArray:::.get_ans_type(x, must.be.numeric = TRUE) @@ -23,9 +23,11 @@ if (length(val) == 0L) { return(numeric(ncol(x))) } - # NOTE: Return value of matrixStats::rowCumsums() has no names - # TODO: Obey top-level `useNames` argument. - unname(do.call(rbind, val)) + val <- do.call(rbind, val) + if (!useNames) { + val <- unname(val) + } + val } ### ---------------------------------------------------------------------------- @@ -46,7 +48,7 @@ #' rowCumsums(dm_Matrix, rows = 2:4) setMethod("rowCumsums", "DelayedMatrix", function(x, rows = NULL, cols = NULL, - force_block_processing = FALSE, ..., useNames = NA) { + force_block_processing = FALSE, ..., useNames = TRUE) { .smart_seed_dispatcher(x, generic = MatrixGenerics::rowCumsums, blockfun = .DelayedMatrix_block_rowCumsums, force_block_processing = force_block_processing, diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/R/rowDiffs.R r-bioc-delayedmatrixstats-1.24.0+ds/R/rowDiffs.R --- r-bioc-delayedmatrixstats-1.22.6+ds/R/rowDiffs.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/R/rowDiffs.R 2023-10-24 18:28:57.000000000 +0000 @@ -8,7 +8,7 @@ .DelayedMatrix_block_rowDiffs <- function(x, rows = NULL, cols = NULL, lag = 1L, differences = 1L, - ..., useNames = NA) { + ..., useNames = TRUE) { # Check input type stopifnot(is(x, "DelayedMatrix")) DelayedArray:::.get_ans_type(x, must.be.numeric = TRUE) @@ -26,9 +26,11 @@ if (length(val) == 0L) { return(numeric(ncol(x))) } - # NOTE: Return value of matrixStats::rowDiffs() has no names - # TODO: Obey top-level `useNames` argument. - unname(do.call(rbind, val)) + val <- do.call(rbind, val) + if (!useNames) { + val <- unname(val) + } + val } @@ -51,7 +53,7 @@ #' rowDiffs(dm_HDF5, cols = seq(ncol(dm_HDF5), 1, -1)) setMethod("rowDiffs", "DelayedMatrix", function(x, rows = NULL, cols = NULL, lag = 1L, differences = 1L, - force_block_processing = FALSE, ..., useNames = NA) { + force_block_processing = FALSE, ..., useNames = TRUE) { .smart_seed_dispatcher(x, generic = MatrixGenerics::rowDiffs, blockfun = .DelayedMatrix_block_rowDiffs, force_block_processing = force_block_processing, diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/R/rowIQRDiffs.R r-bioc-delayedmatrixstats-1.24.0+ds/R/rowIQRDiffs.R --- r-bioc-delayedmatrixstats-1.22.6+ds/R/rowIQRDiffs.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/R/rowIQRDiffs.R 2023-10-24 18:28:57.000000000 +0000 @@ -8,7 +8,7 @@ .DelayedMatrix_block_rowIQRDiffs <- function(x, rows = NULL, cols = NULL, na.rm = FALSE, diff = 1L, - trim = 0, ..., useNames = NA) { + trim = 0, ..., useNames = TRUE) { # Check input type stopifnot(is(x, "DelayedMatrix")) DelayedArray:::.get_ans_type(x, must.be.numeric = TRUE) @@ -27,9 +27,7 @@ if (length(val) == 0L) { return(numeric(ncol(x))) } - # NOTE: Return value of matrixStats::rowIQRDiffs() has names - # TODO: Obey top-level `useNames` argument. - unlist(val, recursive = FALSE, use.names = TRUE) + unlist(val, recursive = FALSE, use.names = useNames) } ### ---------------------------------------------------------------------------- @@ -50,7 +48,7 @@ #' rowIQRDiffs(dm_Rle, rows = 2:4) setMethod("rowIQRDiffs", "DelayedMatrix", function(x, rows = NULL, cols = NULL, na.rm = FALSE, diff = 1L, - trim = 0, force_block_processing = FALSE, ..., useNames = NA) { + trim = 0, force_block_processing = FALSE, ..., useNames = TRUE) { .smart_seed_dispatcher(x, generic = MatrixGenerics::rowIQRDiffs, blockfun = .DelayedMatrix_block_rowIQRDiffs, force_block_processing = force_block_processing, diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/R/rowIQRs.R r-bioc-delayedmatrixstats-1.24.0+ds/R/rowIQRs.R --- r-bioc-delayedmatrixstats-1.22.6+ds/R/rowIQRs.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/R/rowIQRs.R 2023-10-24 18:28:57.000000000 +0000 @@ -7,7 +7,7 @@ ### .DelayedMatrix_block_rowIQRs <- function(x, rows = NULL, cols = NULL, - na.rm = FALSE, ..., useNames = NA) { + na.rm = FALSE, ..., useNames = TRUE) { # Check input type stopifnot(is(x, "DelayedMatrix")) DelayedArray:::.get_ans_type(x, must.be.numeric = FALSE) @@ -24,9 +24,7 @@ if (length(val) == 0L) { return(numeric(ncol(x))) } - # NOTE: Return value of matrixStats::rowIQRs() has no names - # TODO: Obey top-level `useNames` argument. - unlist(val, recursive = FALSE, use.names = FALSE) + unlist(val, recursive = FALSE, use.names = useNames) } ### ---------------------------------------------------------------------------- @@ -47,7 +45,7 @@ #' rowIQRs(dm_matrix, rows = 2:4) setMethod("rowIQRs", "DelayedMatrix", function(x, rows = NULL, cols = NULL, na.rm = FALSE, - force_block_processing = FALSE, ..., useNames = NA) { + force_block_processing = FALSE, ..., useNames = TRUE) { .smart_seed_dispatcher(x, generic = MatrixGenerics::rowIQRs, blockfun = .DelayedMatrix_block_rowIQRs, force_block_processing = force_block_processing, diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/R/rowLogSumExps.R r-bioc-delayedmatrixstats-1.24.0+ds/R/rowLogSumExps.R --- r-bioc-delayedmatrixstats-1.22.6+ds/R/rowLogSumExps.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/R/rowLogSumExps.R 2023-10-24 18:28:57.000000000 +0000 @@ -8,7 +8,7 @@ .DelayedMatrix_block_rowLogSumExps <- function(lx, rows = NULL, cols = NULL, na.rm = FALSE, - ..., useNames = NA) { + ..., useNames = TRUE) { # Check input type stopifnot(is(lx, "DelayedMatrix")) DelayedArray:::.get_ans_type(lx, must.be.numeric = TRUE) @@ -25,9 +25,7 @@ if (length(val) == 0L) { return(numeric(ncol(lx))) } - # NOTE: Return value of matrixStats::rowLogSumExps() has names - # TODO: Obey top-level `useNames` argument. - unlist(val, recursive = FALSE, use.names = TRUE) + unlist(val, recursive = FALSE, use.names = useNames) } ### ---------------------------------------------------------------------------- @@ -47,7 +45,7 @@ #' rowLogSumExps(log(x)) setMethod("rowLogSumExps", "DelayedMatrix", function(lx, rows = NULL, cols = NULL, na.rm = FALSE, - force_block_processing = FALSE, ..., useNames = NA) { + force_block_processing = FALSE, ..., useNames = TRUE) { .smart_seed_dispatcher(lx, generic = MatrixGenerics::rowLogSumExps, blockfun = .DelayedMatrix_block_rowLogSumExps, force_block_processing = force_block_processing, diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/R/rowMadDiffs.R r-bioc-delayedmatrixstats-1.24.0+ds/R/rowMadDiffs.R --- r-bioc-delayedmatrixstats-1.22.6+ds/R/rowMadDiffs.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/R/rowMadDiffs.R 2023-10-24 18:28:57.000000000 +0000 @@ -8,7 +8,7 @@ .DelayedMatrix_block_rowMadDiffs <- function(x, rows = NULL, cols = NULL, na.rm = FALSE, diff = 1L, - trim = 0, ..., useNames = NA) { + trim = 0, ..., useNames = TRUE) { # Check input type stopifnot(is(x, "DelayedMatrix")) DelayedArray:::.get_ans_type(x, must.be.numeric = TRUE) @@ -27,9 +27,7 @@ if (length(val) == 0L) { return(numeric(ncol(x))) } - # NOTE: Return value of matrixStats::colIQRDiffs() has names - # TODO: Obey top-level `useNames` argument. - unlist(val, recursive = FALSE, use.names = TRUE) + unlist(val, recursive = FALSE, use.names = useNames) } ### ---------------------------------------------------------------------------- @@ -50,7 +48,7 @@ #' rowMadDiffs(dm_Rle, rows = 2:4) setMethod("rowMadDiffs", "DelayedMatrix", function(x, rows = NULL, cols = NULL, na.rm = FALSE, diff = 1L, - trim = 0, force_block_processing = FALSE, ..., useNames = NA) { + trim = 0, force_block_processing = FALSE, ..., useNames = TRUE) { .smart_seed_dispatcher(x, generic = MatrixGenerics::rowMadDiffs, blockfun = .DelayedMatrix_block_rowMadDiffs, force_block_processing = force_block_processing, diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/R/rowMads.R r-bioc-delayedmatrixstats-1.24.0+ds/R/rowMads.R --- r-bioc-delayedmatrixstats-1.22.6+ds/R/rowMads.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/R/rowMads.R 2023-10-24 18:28:57.000000000 +0000 @@ -8,7 +8,7 @@ .DelayedMatrix_block_rowMads <- function(x, rows = NULL, cols = NULL, center = NULL, constant = 1.4826, - na.rm = FALSE, ..., useNames = NA) { + na.rm = FALSE, ..., useNames = TRUE) { # Check input type stopifnot(is(x, "DelayedMatrix")) DelayedArray:::.get_ans_type(x, must.be.numeric = TRUE) @@ -38,13 +38,11 @@ if (length(val) == 0L) { return(numeric(nrow(x))) } - # NOTE: Return value of matrixStats::rowMads() has no names - # TODO: Obey top-level `useNames` argument. - unlist(val, recursive = FALSE, use.names = FALSE) + unlist(val, recursive = FALSE, use.names = useNames) } #' @importFrom DelayedArray currentViewport makeNindexFromArrayViewport -.rowMads_internal <- function(x, center, ..., useNames = NA) { +.rowMads_internal <- function(x, center, ..., useNames = TRUE) { if (!is.null(center) && length(center) != 1L) { block.env <- parent.frame(2) vp <- currentViewport(block.env) @@ -74,7 +72,7 @@ setMethod("rowMads", "DelayedMatrix", function(x, rows = NULL, cols = NULL, center = NULL, constant = 1.4826, na.rm = FALSE, - force_block_processing = FALSE, ..., useNames = NA) { + force_block_processing = FALSE, ..., useNames = TRUE) { .smart_seed_dispatcher(x, generic = MatrixGenerics::rowMads, blockfun = .DelayedMatrix_block_rowMads, force_block_processing = force_block_processing, diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/R/rowMeans2.R r-bioc-delayedmatrixstats-1.24.0+ds/R/rowMeans2.R --- r-bioc-delayedmatrixstats-1.22.6+ds/R/rowMeans2.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/R/rowMeans2.R 2023-10-24 18:28:57.000000000 +0000 @@ -7,7 +7,7 @@ ### .DelayedMatrix_block_rowMeans2 <- function(x, rows = NULL, cols = NULL, - na.rm = FALSE, ..., useNames = useNames) { + na.rm = FALSE, ..., useNames = TRUE) { # Check input stopifnot(is(x, "DelayedMatrix")) DelayedArray:::.get_ans_type(x, must.be.numeric = TRUE) @@ -24,9 +24,7 @@ if (length(val) == 0L) { return(numeric(nrow(x))) } - # NOTE: Return value of matrixStats::rowMeans() has no names - # TODO: Obey top-level `useNames` argument. - unlist(val, recursive = FALSE, use.names = FALSE) + unlist(val, recursive = FALSE, use.names = useNames) } ### ---------------------------------------------------------------------------- @@ -54,7 +52,7 @@ #' options(DelayedMatrixStats.verbose = FALSE) setMethod("rowMeans2", "DelayedMatrix", function(x, rows = NULL, cols = NULL, na.rm = FALSE, - force_block_processing = FALSE, ..., useNames = NA) { + force_block_processing = FALSE, ..., useNames = TRUE) { .smart_seed_dispatcher(x, generic = MatrixGenerics::rowMeans2, blockfun = .DelayedMatrix_block_rowMeans2, force_block_processing = force_block_processing, @@ -75,11 +73,13 @@ #' @export setMethod("rowMeans2", "Matrix", function(x, rows = NULL, cols = NULL, na.rm = FALSE, - ..., useNames = NA) { + ..., useNames = TRUE) { message2(class(x), get_verbose()) x <- ..subset(x, rows, cols) - # NOTE: Return value of matrixStats::rowMeans2() has no names - # TODO: Obey top-level `useNames` argument. - unname(rowMeans(x = x, na.rm = na.rm)) + val <- rowMeans(x = x, na.rm = na.rm) + if (!useNames) { + val <- unname(val) + } + val } ) diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/R/rowMedians.R r-bioc-delayedmatrixstats-1.24.0+ds/R/rowMedians.R --- r-bioc-delayedmatrixstats-1.22.6+ds/R/rowMedians.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/R/rowMedians.R 2023-10-24 18:28:57.000000000 +0000 @@ -7,7 +7,7 @@ ### .DelayedMatrix_block_rowMedians <- function(x, rows = NULL, cols = NULL, - na.rm = FALSE, ..., useNames = NA) { + na.rm = FALSE, ..., useNames = TRUE) { # Check input type stopifnot(is(x, "DelayedMatrix")) DelayedArray:::.get_ans_type(x, must.be.numeric = TRUE) @@ -24,9 +24,7 @@ if (length(val) == 0L) { return(numeric(ncol(x))) } - # NOTE: Return value of matrixStats::rowMedians() has no names - # TODO: Obey top-level `useNames` argument. - unlist(val, recursive = FALSE, use.names = FALSE) + unlist(val, recursive = FALSE, use.names = useNames) } ### ---------------------------------------------------------------------------- @@ -46,7 +44,7 @@ #' rowMedians(dm_Matrix) setMethod("rowMedians", "DelayedMatrix", function(x, rows = NULL, cols = NULL, na.rm = FALSE, - force_block_processing = FALSE, ..., useNames = NA) { + force_block_processing = FALSE, ..., useNames = TRUE) { .smart_seed_dispatcher(x, generic = MatrixGenerics::rowMedians, blockfun = .DelayedMatrix_block_rowMedians, force_block_processing = force_block_processing, diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/R/rowOrderStats.R r-bioc-delayedmatrixstats-1.24.0+ds/R/rowOrderStats.R --- r-bioc-delayedmatrixstats-1.22.6+ds/R/rowOrderStats.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/R/rowOrderStats.R 2023-10-24 18:28:57.000000000 +0000 @@ -7,7 +7,7 @@ ### .DelayedMatrix_block_rowOrderStats <- function(x, rows = NULL, cols = NULL, - which, ..., useNames = NA) { + which, ..., useNames = TRUE) { # Check input type stopifnot(is(x, "DelayedMatrix")) DelayedArray:::.get_ans_type(x, must.be.numeric = TRUE) @@ -24,9 +24,7 @@ if (length(val) == 0L) { return(numeric(ncol(x))) } - # NOTE: Return value of matrixStats::rowOrderStats() has no names - # TODO: Obey top-level `useNames` argument. - unlist(val, recursive = FALSE, use.names = FALSE) + unlist(val, recursive = FALSE, use.names = useNames) } ### ---------------------------------------------------------------------------- @@ -48,7 +46,7 @@ #' rowOrderStats(dm_Matrix, which = 2) setMethod("rowOrderStats", "DelayedMatrix", function(x, rows = NULL, cols = NULL, which, - force_block_processing = FALSE, ..., useNames = NA) { + force_block_processing = FALSE, ..., useNames = TRUE) { .smart_seed_dispatcher(x, generic = MatrixGenerics::rowOrderStats, blockfun = .DelayedMatrix_block_rowOrderStats, force_block_processing = force_block_processing, diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/R/rowProds.R r-bioc-delayedmatrixstats-1.24.0+ds/R/rowProds.R --- r-bioc-delayedmatrixstats-1.22.6+ds/R/rowProds.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/R/rowProds.R 2023-10-24 18:28:57.000000000 +0000 @@ -9,7 +9,7 @@ .DelayedMatrix_block_rowProds <- function(x, rows = NULL, cols = NULL, na.rm = FALSE, method = c("direct", "expSumLog"), - ..., useNames = NA) { + ..., useNames = TRUE) { # Check input method <- match.arg(method) stopifnot(is(x, "DelayedMatrix")) @@ -28,9 +28,7 @@ if (length(val) == 0L) { return(numeric(ncol(x))) } - # NOTE: Return value of matrixStats::rowProds() has no names - # TODO: Obey top-level `useNames` argument. - unlist(val, recursive = FALSE, use.names = FALSE) + unlist(val, recursive = FALSE, use.names = useNames) } ### ---------------------------------------------------------------------------- @@ -51,7 +49,7 @@ setMethod("rowProds", "DelayedMatrix", function(x, rows = NULL, cols = NULL, na.rm = FALSE, method = c("direct", "expSumLog"), - force_block_processing = FALSE, ..., useNames = NA) { + force_block_processing = FALSE, ..., useNames = TRUE) { method <- match.arg(method) .smart_seed_dispatcher(x, generic = MatrixGenerics::rowProds, blockfun = .DelayedMatrix_block_rowProds, diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/R/rowQuantiles.R r-bioc-delayedmatrixstats-1.24.0+ds/R/rowQuantiles.R --- r-bioc-delayedmatrixstats-1.22.6+ds/R/rowQuantiles.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/R/rowQuantiles.R 2023-10-24 18:28:57.000000000 +0000 @@ -9,7 +9,7 @@ .DelayedMatrix_block_rowQuantiles <- function(x, rows = NULL, cols = NULL, probs = seq(from = 0, to = 1, by = 0.25), na.rm = FALSE, type = 7L, - ..., useNames = NA, drop = TRUE) { + ..., useNames = TRUE, drop = TRUE) { # Check input type stopifnot(is(x, "DelayedMatrix")) DelayedArray:::.get_ans_type(x, must.be.numeric = FALSE) @@ -31,9 +31,10 @@ return(numeric(ncol(x))) } - # TODO: Obey top-level `useNames` argument. val <- do.call(rbind, val) - rownames(val) <- rownames(x) + if (useNames) { + rownames(val) <- rownames(x) + } if (drop && any(dim(val)==1L)) { return(drop(val)) @@ -60,7 +61,7 @@ setMethod("rowQuantiles", "DelayedMatrix", function(x, rows = NULL, cols = NULL, probs = seq(from = 0, to = 1, by = 0.25), na.rm = FALSE, - type = 7L, force_block_processing = FALSE, ..., useNames = NA, + type = 7L, force_block_processing = FALSE, ..., useNames = TRUE, drop = TRUE) { .smart_seed_dispatcher(x, generic = MatrixGenerics::rowQuantiles, blockfun = .DelayedMatrix_block_rowQuantiles, @@ -69,7 +70,7 @@ cols = cols, probs = probs, na.rm = na.rm, - # type = type, TODO: wait for SMS to fix. + type = type, ..., useNames = useNames, drop = drop) diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/R/rowRanks.R r-bioc-delayedmatrixstats-1.24.0+ds/R/rowRanks.R --- r-bioc-delayedmatrixstats-1.22.6+ds/R/rowRanks.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/R/rowRanks.R 2023-10-24 18:28:57.000000000 +0000 @@ -8,7 +8,7 @@ .DelayedMatrix_block_rowRanks <- function(x, rows = NULL, cols = NULL, - ties.method = c("max", "average", "first", "last", "random", "max", "min", "dense"), ..., useNames = NA) { + ties.method = c("max", "average", "first", "last", "random", "max", "min", "dense"), ..., useNames = TRUE) { # Check input type ties.method <- match.arg(ties.method) stopifnot(is(x, "DelayedMatrix")) @@ -26,9 +26,11 @@ if (length(val) == 0L) { return(numeric(ncol(x))) } - # NOTE: Return value of matrixStats::rowRanks() has no names - # TODO: Obey top-level `useNames` argument. - unname(do.call(rbind, val)) + val <- do.call(rbind, val) + if (!useNames) { + val <- unname(val) + } + val } ### ---------------------------------------------------------------------------- @@ -49,7 +51,7 @@ setMethod("rowRanks", "DelayedMatrix", function(x, rows = NULL, cols = NULL, ties.method = c("max", "average", "first", "last", "random", "max", "min", "dense"), - force_block_processing = FALSE, ..., useNames = NA) { + force_block_processing = FALSE, ..., useNames = TRUE) { ties.method <- match.arg(ties.method) .smart_seed_dispatcher(x, generic = MatrixGenerics::rowRanks, blockfun = .DelayedMatrix_block_rowRanks, diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/R/rowSdDiffs.R r-bioc-delayedmatrixstats-1.24.0+ds/R/rowSdDiffs.R --- r-bioc-delayedmatrixstats-1.22.6+ds/R/rowSdDiffs.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/R/rowSdDiffs.R 2023-10-24 18:28:57.000000000 +0000 @@ -8,7 +8,7 @@ .DelayedMatrix_block_rowSdDiffs <- function(x, rows = NULL, cols = NULL, na.rm = FALSE, diff = 1L, - trim = 0, ..., useNames = NA) { + trim = 0, ..., useNames = TRUE) { # Check input type stopifnot(is(x, "DelayedMatrix")) DelayedArray:::.get_ans_type(x, must.be.numeric = TRUE) @@ -27,9 +27,7 @@ if (length(val) == 0L) { return(numeric(ncol(x))) } - # NOTE: Return value of matrixStats::rowSdDiffs() has names - # TODO: Obey top-level `useNames` argument. - unlist(val, recursive = FALSE, use.names = TRUE) + unlist(val, recursive = FALSE, use.names = useNames) } ### ---------------------------------------------------------------------------- @@ -50,7 +48,7 @@ #' rowSdDiffs(dm_Rle, rows = 2:4) setMethod("rowSdDiffs", "DelayedMatrix", function(x, rows = NULL, cols = NULL, na.rm = FALSE, diff = 1L, - trim = 0, force_block_processing = FALSE, ..., useNames = NA) { + trim = 0, force_block_processing = FALSE, ..., useNames = TRUE) { .smart_seed_dispatcher(x, generic = MatrixGenerics::rowSdDiffs, blockfun = .DelayedMatrix_block_rowSdDiffs, force_block_processing = force_block_processing, diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/R/rowSds.R r-bioc-delayedmatrixstats-1.24.0+ds/R/rowSds.R --- r-bioc-delayedmatrixstats-1.22.6+ds/R/rowSds.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/R/rowSds.R 2023-10-24 18:28:57.000000000 +0000 @@ -19,7 +19,7 @@ #' rowSds(dm_DF) setMethod("rowSds", "DelayedMatrix", function(x, rows = NULL, cols = NULL, na.rm = FALSE, center = NULL, - force_block_processing = FALSE, ..., useNames = NA) { + force_block_processing = FALSE, ..., useNames = TRUE) { sqrt(rowVars(x = x, rows = rows, cols = cols, diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/R/rowSums2.R r-bioc-delayedmatrixstats-1.24.0+ds/R/rowSums2.R --- r-bioc-delayedmatrixstats-1.22.6+ds/R/rowSums2.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/R/rowSums2.R 2023-10-24 18:28:57.000000000 +0000 @@ -7,7 +7,7 @@ ### .DelayedMatrix_block_rowSums2 <- function(x, rows = NULL, cols = NULL, - na.rm = FALSE, ..., useNames = NA) { + na.rm = FALSE, ..., useNames = TRUE) { # Check input stopifnot(is(x, "DelayedMatrix")) DelayedArray:::.get_ans_type(x, must.be.numeric = FALSE) @@ -24,9 +24,7 @@ if (length(val) == 0L) { return(numeric(nrow(x))) } - # NOTE: Return value of matrixStats::rowSums() has no names - # TODO: Obey top-level `useNames` argument. - unlist(val, recursive = FALSE, use.names = FALSE) + unlist(val, recursive = FALSE, use.names = useNames) } ### ---------------------------------------------------------------------------- @@ -54,7 +52,7 @@ #' options(DelayedMatrixStats.verbose = FALSE) setMethod("rowSums2", "DelayedMatrix", function(x, rows = NULL, cols = NULL, na.rm = FALSE, - force_block_processing = FALSE, ..., useNames = NA) { + force_block_processing = FALSE, ..., useNames = TRUE) { .smart_seed_dispatcher(x, generic = MatrixGenerics::rowSums2, blockfun = .DelayedMatrix_block_rowSums2, force_block_processing = force_block_processing, @@ -75,11 +73,13 @@ #' @export setMethod("rowSums2", "Matrix", function(x, rows = NULL, cols = NULL, na.rm = FALSE, - ..., useNames = useNames) { + ..., useNames = TRUE) { message2(class(x), get_verbose()) x <- ..subset(x, rows, cols) - # NOTE: Return value of matrixStats::rowSums2() has no names - # TODO: Obey top-level `useNames` argument. - unname(rowSums(x = x, na.rm = na.rm)) + val <- rowSums(x = x, na.rm = na.rm) + if (!useNames) { + val <- unname(val) + } + val } ) diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/R/rowTabulates.R r-bioc-delayedmatrixstats-1.24.0+ds/R/rowTabulates.R --- r-bioc-delayedmatrixstats-1.22.6+ds/R/rowTabulates.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/R/rowTabulates.R 2023-10-24 18:28:57.000000000 +0000 @@ -7,7 +7,7 @@ ### .DelayedMatrix_block_rowTabulates <- function(x, rows = NULL, cols = NULL, - values = NULL, ..., useNames = NA) { + values = NULL, ..., useNames = TRUE) { # Check input type stopifnot(is(x, "DelayedMatrix")) DelayedArray:::.get_ans_type(x, must.be.numeric = FALSE) @@ -35,9 +35,11 @@ if (length(val) == 0L) { return(matrix(0L,0,0)) } - # NOTE: Return value of matrixStats::rowTabulates() has names - # TODO: Obey top-level `useNames` argument. - do.call(rbind, val) + val <- do.call(rbind, val) + if (!useNames) { + val <- unname(val) + } + val } ### ---------------------------------------------------------------------------- @@ -58,7 +60,7 @@ #' rowTabulates(dm_DF) setMethod("rowTabulates", "DelayedMatrix", function(x, rows = NULL, cols = NULL, values = NULL, - force_block_processing = FALSE, ..., useNames = NA) { + force_block_processing = FALSE, ..., useNames = TRUE) { if (!type(x) %in% c("integer", "logical", "raw")) { stop("Argument 'x' is not of type integer, logical, or raw", " (type = ", type(x), ")") diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/R/rowVarDiffs.R r-bioc-delayedmatrixstats-1.24.0+ds/R/rowVarDiffs.R --- r-bioc-delayedmatrixstats-1.22.6+ds/R/rowVarDiffs.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/R/rowVarDiffs.R 2023-10-24 18:28:57.000000000 +0000 @@ -8,7 +8,7 @@ .DelayedMatrix_block_rowVarDiffs <- function(x, rows = NULL, cols = NULL, na.rm = FALSE, diff = 1L, - trim = 0, ..., useNames = NA) { + trim = 0, ..., useNames = TRUE) { # Check input type stopifnot(is(x, "DelayedMatrix")) DelayedArray:::.get_ans_type(x, must.be.numeric = TRUE) @@ -27,9 +27,7 @@ if (length(val) == 0L) { return(numeric(ncol(x))) } - # NOTE: Return value of matrixStats::rowVarDiffs() has names - # TODO: Obey top-level `useNames` argument. - unlist(val, recursive = FALSE, use.names = TRUE) + unlist(val, recursive = FALSE, use.names = useNames) } ### ---------------------------------------------------------------------------- @@ -50,7 +48,7 @@ #' rowVarDiffs(dm_Rle, rows = 2:4) setMethod("rowVarDiffs", "DelayedMatrix", function(x, rows = NULL, cols = NULL, na.rm = FALSE, diff = 1L, - trim = 0, force_block_processing = FALSE, ..., useNames = NA) { + trim = 0, force_block_processing = FALSE, ..., useNames = TRUE) { .smart_seed_dispatcher(x, generic = MatrixGenerics::rowVarDiffs, blockfun = .DelayedMatrix_block_rowVarDiffs, force_block_processing = force_block_processing, diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/R/rowVars.R r-bioc-delayedmatrixstats-1.24.0+ds/R/rowVars.R --- r-bioc-delayedmatrixstats-1.22.6+ds/R/rowVars.R 2023-08-28 18:04:43.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/R/rowVars.R 2023-10-24 18:28:57.000000000 +0000 @@ -8,7 +8,7 @@ .DelayedMatrix_block_rowVars <- function(x, rows = NULL, cols = NULL, na.rm = FALSE, center = NULL, - ..., useNames = NA) { + ..., useNames = TRUE) { # Check input type stopifnot(is(x, "DelayedMatrix")) DelayedArray:::.get_ans_type(x, must.be.numeric = TRUE) @@ -52,7 +52,7 @@ #' rowVars(dm_matrix) setMethod("rowVars", "DelayedMatrix", function(x, rows = NULL, cols = NULL, na.rm = FALSE, center = NULL, - force_block_processing = FALSE, ..., useNames = NA) { + force_block_processing = FALSE, ..., useNames = TRUE) { .smart_seed_dispatcher(x, generic = MatrixGenerics::rowVars, blockfun = .DelayedMatrix_block_rowVars, force_block_processing = force_block_processing, diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/R/rowWeightedMads.R r-bioc-delayedmatrixstats-1.24.0+ds/R/rowWeightedMads.R --- r-bioc-delayedmatrixstats-1.22.6+ds/R/rowWeightedMads.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/R/rowWeightedMads.R 2023-10-24 18:28:57.000000000 +0000 @@ -9,7 +9,7 @@ .DelayedMatrix_block_rowWeightedMads <- function(x, w = NULL, rows = NULL, cols = NULL, na.rm = FALSE, constant = 1.4826, - center = NULL, ..., useNames = NA) { + center = NULL, ..., useNames = TRUE) { # Check input type stopifnot(is(x, "DelayedMatrix")) DelayedArray:::.get_ans_type(x, must.be.numeric = FALSE) @@ -51,13 +51,11 @@ if (length(val) == 0L) { return(numeric(nrow(x))) } - # NOTE: Return value of matrixStats::rowWeightedMads() has names - # TODO: Obey top-level `useNames` argument. - unlist(val, recursive = FALSE, use.names = TRUE) + unlist(val, recursive = FALSE, use.names = useNames) } #' @importFrom DelayedArray currentViewport makeNindexFromArrayViewport -.rowWeightedMads_internal <- function(x, center, ..., useNames = useNames) { +.rowWeightedMads_internal <- function(x, center, ..., useNames = TRUE) { if (!is.null(center) && length(center) != 1L) { block.env <- parent.frame(2) vp <- currentViewport(block.env) @@ -87,7 +85,7 @@ setMethod("rowWeightedMads", "DelayedMatrix", function(x, w = NULL, rows = NULL, cols = NULL, na.rm = FALSE, constant = 1.4826, center = NULL, - force_block_processing = FALSE, ..., useNames = NA) { + force_block_processing = FALSE, ..., useNames = TRUE) { .smart_seed_dispatcher(x, generic = MatrixGenerics::rowWeightedMads, blockfun = .DelayedMatrix_block_rowWeightedMads, force_block_processing = force_block_processing, diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/R/rowWeightedMeans.R r-bioc-delayedmatrixstats-1.24.0+ds/R/rowWeightedMeans.R --- r-bioc-delayedmatrixstats-1.22.6+ds/R/rowWeightedMeans.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/R/rowWeightedMeans.R 2023-10-24 18:28:57.000000000 +0000 @@ -8,7 +8,7 @@ .DelayedMatrix_block_rowWeightedMeans <- function(x, w = NULL, rows = NULL, cols = NULL, na.rm = FALSE, - ..., useNames = NA) { + ..., useNames = TRUE) { # Check input type stopifnot(is(x, "DelayedMatrix")) DelayedArray:::.get_ans_type(x, must.be.numeric = FALSE) @@ -37,9 +37,7 @@ if (length(val) == 0L) { return(numeric(ncol(x))) } - # NOTE: Return value of matrixStats::rowWeightedMeans() has names - # TODO: Obey top-level `useNames` argument. - unlist(val, recursive = FALSE, use.names = TRUE) + unlist(val, recursive = FALSE, use.names = useNames) } ### ---------------------------------------------------------------------------- @@ -58,7 +56,7 @@ #' rowWeightedMeans(dm_Matrix, w = 1:3) setMethod("rowWeightedMeans", "DelayedMatrix", function(x, w = NULL, rows = NULL, cols = NULL, na.rm = FALSE, - force_block_processing = FALSE, ..., useNames = NA) { + force_block_processing = FALSE, ..., useNames = TRUE) { .smart_seed_dispatcher(x, generic="rowWeightedMeans", blockfun = .DelayedMatrix_block_rowWeightedMeans, force_block_processing = force_block_processing, diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/R/rowWeightedMedians.R r-bioc-delayedmatrixstats-1.24.0+ds/R/rowWeightedMedians.R --- r-bioc-delayedmatrixstats-1.22.6+ds/R/rowWeightedMedians.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/R/rowWeightedMedians.R 2023-10-24 18:28:57.000000000 +0000 @@ -8,7 +8,7 @@ .DelayedMatrix_block_rowWeightedMedians <- function(x, w = NULL, rows = NULL, cols = NULL, na.rm = FALSE, - ..., useNames = NA) { + ..., useNames = TRUE) { # Check input type stopifnot(is(x, "DelayedMatrix")) DelayedArray:::.get_ans_type(x, must.be.numeric = TRUE) @@ -37,9 +37,7 @@ if (length(val) == 0L) { return(numeric(ncol(x))) } - # NOTE: Return value of matrixStats::rowWeightedMedians() has names - # TODO: Obey top-level `useNames` argument. - unlist(val, recursive = FALSE, use.names = TRUE) + unlist(val, recursive = FALSE, use.names = useNames) } ### ---------------------------------------------------------------------------- @@ -56,7 +54,7 @@ #' @export setMethod("rowWeightedMedians", "DelayedMatrix", function(x, w = NULL, rows = NULL, cols = NULL, na.rm = FALSE, - force_block_processing = FALSE, ..., useNames = NA) { + force_block_processing = FALSE, ..., useNames = TRUE) { .smart_seed_dispatcher(x, generic = MatrixGenerics::rowWeightedMedians, blockfun = .DelayedMatrix_block_rowWeightedMedians, force_block_processing = force_block_processing, diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/R/rowWeightedSds.R r-bioc-delayedmatrixstats-1.24.0+ds/R/rowWeightedSds.R --- r-bioc-delayedmatrixstats-1.22.6+ds/R/rowWeightedSds.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/R/rowWeightedSds.R 2023-10-24 18:28:57.000000000 +0000 @@ -20,7 +20,7 @@ #' rowWeightedSds(dm_Rle, w = 1 / colMeans2(dm_Rle)) setMethod("rowWeightedSds", "DelayedMatrix", function(x, w = NULL, rows = NULL, cols = NULL, na.rm = FALSE, - force_block_processing = FALSE, ..., useNames = NA) { + force_block_processing = FALSE, ..., useNames = TRUE) { sqrt(rowWeightedVars( x = x, w = w, diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/R/rowWeightedVars.R r-bioc-delayedmatrixstats-1.24.0+ds/R/rowWeightedVars.R --- r-bioc-delayedmatrixstats-1.22.6+ds/R/rowWeightedVars.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/R/rowWeightedVars.R 2023-10-24 18:28:57.000000000 +0000 @@ -8,7 +8,7 @@ .DelayedMatrix_block_rowWeightedVars <- function(x, w = NULL, rows = NULL, cols = NULL, na.rm = FALSE, - ..., useNames = NA) { + ..., useNames = TRUE) { # Check input type stopifnot(is(x, "DelayedMatrix")) DelayedArray:::.get_ans_type(x, must.be.numeric = TRUE) @@ -37,9 +37,7 @@ if (length(val) == 0L) { return(numeric(ncol(x))) } - # NOTE: Return value of matrixStats::rowWeightedVars() has names - # TODO: Obey top-level `useNames` argument. - unlist(val, recursive = FALSE, use.names = TRUE) + unlist(val, recursive = FALSE, use.names = useNames) } ### ---------------------------------------------------------------------------- @@ -60,7 +58,7 @@ #' rowWeightedVars(dm_Rle, w = 1 / colMeans2(dm_Rle)) setMethod("rowWeightedVars", "DelayedMatrix", function(x, w = NULL, rows = NULL, cols = NULL, na.rm = FALSE, - force_block_processing = FALSE, ..., useNames = NA) { + force_block_processing = FALSE, ..., useNames = TRUE) { .smart_seed_dispatcher(x, generic = MatrixGenerics::rowWeightedVars, blockfun = .DelayedMatrix_block_rowWeightedVars, force_block_processing = force_block_processing, diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/R/utils.R r-bioc-delayedmatrixstats-1.24.0+ds/R/utils.R --- r-bioc-delayedmatrixstats-1.22.6+ds/R/utils.R 2023-07-06 18:06:20.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/R/utils.R 2023-10-24 18:28:57.000000000 +0000 @@ -308,7 +308,7 @@ # (see extract_array,DelayedOp-method)? #' @importFrom DelayedArray isPristine -.smart_seed_dispatcher <- function(x, generic, blockfun, ..., force_block_processing = FALSE, useNames = NA) { +.smart_seed_dispatcher <- function(x, generic, blockfun, ..., force_block_processing = FALSE, useNames = TRUE) { if (isPristine(x) && !force_block_processing) { S <- seed(x) candidate <- selectMethod(generic, class(S)[1], optional=TRUE) diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/README.Rmd r-bioc-delayedmatrixstats-1.24.0+ds/README.Rmd --- r-bioc-delayedmatrixstats-1.22.6+ds/README.Rmd 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/README.Rmd 1970-01-01 00:00:00.000000000 +0000 @@ -1,171 +0,0 @@ ---- -output: github_document -editor_options: - chunk_output_type: console ---- - - - -```{r, echo = FALSE} -knitr::opts_chunk$set( - collapse = TRUE, - comment = "#>", - fig.path = "README-" -) -``` - -# DelayedMatrixStats - -[![Travis-CI Build Status](https://travis-ci.org/PeteHaitch/DelayedMatrixStats.svg?branch=master)](https://travis-ci.org/PeteHaitch/DelayedMatrixStats) -[![Coverage Status](https://codecov.io/gh/PeteHaitch/DelayedMatrixStats/branch/master/graph/badge.svg)](https://codecov.io/gh/PeteHaitch/DelayedMatrixStats) - -**DelayedMatrixStats** is a port of the -[**matrixStats**](https://CRAN.R-project.org/package=matrixStats) API to work -with *DelayedMatrix* objects from the -[**DelayedArray**](http://bioconductor.org/packages/DelayedArray/) package. - -For a *DelayedMatrix*, `x`, the simplest way to apply a function, `f()`, from -**matrixStats** is`matrixStats::f(as.matrix(x))`. However, this "*realizes*" -`x` in memory as a *base::matrix*, which typically defeats the entire purpose -of using a *DelayedMatrix* for storing the data. - -The **DelayedArray** package already implements a clever strategy called -"block-processing" for certain common "matrix stats" operations (e.g. -`colSums()`, `rowSums()`). This is a good start, but not all of the -**matrixStats** API is currently supported. Furthermore, certain operations can -be optimized with additional information about `x`. I'll refer to these -"seed-aware" implementations. - -## Installation - -You can install **DelayedMatrixStats** from Bioconductor with: - -```{r gh-installation, eval = FALSE} -if (!requireNamespace("BiocManager", quietly = TRUE)) - install.packages("BiocManager") - -BiocManager::install("DelayedMatrixStats") -``` - -## Example - -This example compares two ways of computing column sums of a *DelayedMatrix* -object: - -1. `DelayedMatrix::colSums()`: The 'block-processing strategy', implemented in the **DelayedArray** package. The block-processing strategy works for any *DelayedMatrix* object, regardless of the type of *seed*. -2. `DelayedMatrixStats::colSums2()`: The 'seed-aware' strategy, implemented in the -**DelayedMatrixStats** package. The seed-aware implementation is optimized for both speed and memory but only for *DelayedMatrix* objects with certain types of *seed*. - -```{r real_pkg_load, message = FALSE, echo = FALSE} -devtools::load_all() -library(sparseMatrixStats) -library(microbenchmark) -library(profmem) -``` - -```{r fake_pkg_load, message = FALSE, echo = TRUE, eval = FALSE} -library(DelayedMatrixStats) -library(sparseMatrixStats) -library(microbenchmark) -library(profmem) -``` - -```{r example, message = FALSE} -set.seed(666) - -# Fast column sums of DelayedMatrix with matrix seed -dense_matrix <- DelayedArray(matrix(runif(20000 * 600), nrow = 20000, - ncol = 600)) -class(seed(dense_matrix)) -dense_matrix -microbenchmark(DelayedArray::colSums(dense_matrix), - DelayedMatrixStats::colSums2(dense_matrix), - times = 10) -profmem::total(profmem::profmem(DelayedArray::colSums(dense_matrix))) -profmem::total(profmem::profmem(DelayedMatrixStats::colSums2(dense_matrix))) - -# Fast, low-memory column sums of DelayedMatrix with sparse matrix seed -sparse_matrix <- seed(dense_matrix) -zero_idx <- sample(length(sparse_matrix), 0.6 * length(sparse_matrix)) -sparse_matrix[zero_idx] <- 0 -sparse_matrix <- DelayedArray(Matrix::Matrix(sparse_matrix, sparse = TRUE)) -class(seed(sparse_matrix)) -sparse_matrix -microbenchmark(DelayedArray::colSums(sparse_matrix), - DelayedMatrixStats::colSums2(sparse_matrix), - times = 10) -profmem::total(profmem::profmem(DelayedArray::colSums(sparse_matrix))) -profmem::total(profmem::profmem(DelayedMatrixStats::colSums2(sparse_matrix))) - -# Fast column sums of DelayedMatrix with Rle-based seed -rle_matrix <- RleArray(Rle(sample(2L, 200000 * 6 / 10, replace = TRUE), 100), - dim = c(2000000, 6)) -class(seed(rle_matrix)) -rle_matrix -microbenchmark(DelayedArray::colSums(rle_matrix), - DelayedMatrixStats::colSums2(rle_matrix), - times = 10) -profmem::total(profmem::profmem(DelayedArray::colSums(rle_matrix))) -profmem::total(profmem::profmem(DelayedMatrixStats::colSums2(rle_matrix))) -``` - -## Benchmarking - -An extensive set of benchmarks is under development at [http://peterhickey.org/BenchmarkingDelayedMatrixStats/](http://peterhickey.org/BenchmarkingDelayedMatrixStats/). - -## API coverage - -- ✔ = Implemented in **DelayedMatrixStats** -- ☑️ = Implemented in [**DelayedArray**](http://bioconductor.org/packages/DelayedArray/) or [**sparseMatrixStats**](http://bioconductor.org/packages/sparseMatrixStats/) -- ❌: = Not yet implemented - -```{r, echo = FALSE, comment="", results = "asis"} -matrixStats <- sort( - c("colsum", "rowsum", grep("^(col|row)", - getNamespaceExports("matrixStats"), - value = TRUE))) -sparseMatrixStats <- getNamespaceExports("sparseMatrixStats") -DelayedMatrixStats <- getNamespaceExports("DelayedMatrixStats") -DelayedArray <- getNamespaceExports("DelayedArray") - -api_df <- data.frame( - Method = paste0("`", matrixStats, "()`"), - `Block processing` = ifelse( - matrixStats %in% DelayedMatrixStats, - "✔", - ifelse(matrixStats %in% c(DelayedArray, sparseMatrixStats), "☑️", "❌")), - `_base::matrix_ optimized` = - ifelse(sapply(matrixStats, existsMethod, signature = "matrix_OR_array_OR_table_OR_numeric"), - "✔", - "❌"), - `_Matrix::dgCMatrix_ optimized` = - ifelse(sapply(matrixStats, existsMethod, signature = "xgCMatrix") | sapply(matrixStats, existsMethod, signature = "dgCMatrix"), - "✔", - "❌"), - `_Matrix::lgCMatrix_ optimized` = - ifelse(sapply(matrixStats, existsMethod, signature = "xgCMatrix") | sapply(matrixStats, existsMethod, signature = "lgCMatrix"), - "✔", - "❌"), - `_DelayedArray::RleArray_ (_SolidRleArraySeed_) optimized` = - ifelse(sapply(matrixStats, existsMethod, signature = "SolidRleArraySeed"), - "✔", - "❌"), - `_DelayedArray::RleArray_ (_ChunkedRleArraySeed_) optimized` = - ifelse(sapply(matrixStats, existsMethod, signature = "ChunkedRleArraySeed"), - "✔", - "❌"), - `_HDF5Array::HDF5Matrix_ optimized` = - ifelse(sapply(matrixStats, existsMethod, signature = "HDF5ArraySeed"), - "✔", - "❌"), - `_base::data.frame_ optimized` = - ifelse(sapply(matrixStats, existsMethod, signature = "data.frame"), - "✔", - "❌"), - `_S4Vectors::DataFrame_ optimized` = - ifelse(sapply(matrixStats, existsMethod, signature = "DataFrame"), - "✔", - "❌"), - check.names = FALSE) -knitr::kable(api_df, row.names = FALSE) -``` diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/README.md r-bioc-delayedmatrixstats-1.24.0+ds/README.md --- r-bioc-delayedmatrixstats-1.22.6+ds/README.md 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/README.md 2023-10-24 18:28:57.000000000 +0000 @@ -3,11 +3,6 @@ # DelayedMatrixStats -[![Travis-CI Build -Status](https://travis-ci.org/PeteHaitch/DelayedMatrixStats.svg?branch=master)](https://travis-ci.org/PeteHaitch/DelayedMatrixStats) -[![Coverage -Status](https://codecov.io/gh/PeteHaitch/DelayedMatrixStats/branch/master/graph/badge.svg)](https://codecov.io/gh/PeteHaitch/DelayedMatrixStats) - **DelayedMatrixStats** is a port of the [**matrixStats**](https://CRAN.R-project.org/package=matrixStats) API to work with *DelayedMatrix* objects from the @@ -67,7 +62,7 @@ class(seed(dense_matrix)) #> [1] "matrix" "array" dense_matrix -#> <20000 x 600> matrix of class DelayedMatrix and type "double": +#> <20000 x 600> DelayedMatrix object of type "double": #> [,1] [,2] [,3] ... [,599] [,600] #> [1,] 0.7743685 0.6601787 0.4098798 . 0.89118118 0.05776471 #> [2,] 0.1972242 0.8436035 0.9198450 . 0.31799523 0.63099417 @@ -83,17 +78,20 @@ microbenchmark(DelayedArray::colSums(dense_matrix), DelayedMatrixStats::colSums2(dense_matrix), times = 10) +#> Warning in microbenchmark(DelayedArray::colSums(dense_matrix), +#> DelayedMatrixStats::colSums2(dense_matrix), : less accurate nanosecond times to +#> avoid potential integer overflows #> Unit: milliseconds -#> expr min lq mean -#> DelayedArray::colSums(dense_matrix) 56.38951 64.86599 133.35052 -#> DelayedMatrixStats::colSums2(dense_matrix) 13.17369 13.42267 16.13503 -#> median uq max neval -#> 69.60622 99.45897 387.84531 10 -#> 13.62974 19.31188 26.88653 10 +#> expr min lq mean median +#> DelayedArray::colSums(dense_matrix) 34.40999 36.9674 74.70216 37.82125 +#> DelayedMatrixStats::colSums2(dense_matrix) 11.58172 11.6326 11.78802 11.80099 +#> uq max neval +#> 38.53483 237.57302 10 +#> 11.84264 12.11706 10 profmem::total(profmem::profmem(DelayedArray::colSums(dense_matrix))) -#> [1] 96105416 +#> [1] 96106072 profmem::total(profmem::profmem(DelayedMatrixStats::colSums2(dense_matrix))) -#> [1] 166120 +#> [1] 6064 # Fast, low-memory column sums of DelayedMatrix with sparse matrix seed sparse_matrix <- seed(dense_matrix) @@ -105,7 +103,7 @@ #> attr(,"package") #> [1] "Matrix" sparse_matrix -#> <20000 x 600> sparse matrix of class DelayedMatrix and type "double": +#> <20000 x 600> sparse DelayedMatrix object of type "double": #> [,1] [,2] [,3] ... [,599] [,600] #> [1,] 0.7743685 0.0000000 0.0000000 . 0.89118118 0.00000000 #> [2,] 0.1972242 0.0000000 0.9198450 . 0.00000000 0.00000000 @@ -122,14 +120,14 @@ DelayedMatrixStats::colSums2(sparse_matrix), times = 10) #> Unit: milliseconds -#> expr min lq mean -#> DelayedArray::colSums(sparse_matrix) 244.80755 283.351854 462.626259 -#> DelayedMatrixStats::colSums2(sparse_matrix) 5.88743 6.336195 9.073628 -#> median uq max neval -#> 447.99469 570.09305 899.81807 10 -#> 6.47515 14.54563 16.28401 10 +#> expr min lq mean +#> DelayedArray::colSums(sparse_matrix) 134.857651 136.171 171.397261 +#> DelayedMatrixStats::colSums2(sparse_matrix) 5.101917 5.125 5.211075 +#> median uq max neval +#> 141.518306 144.831639 300.116474 10 +#> 5.191625 5.254273 5.403226 10 profmem::total(profmem::profmem(DelayedArray::colSums(sparse_matrix))) -#> [1] 249647176 +#> [1] 249647440 profmem::total(profmem::profmem(DelayedMatrixStats::colSums2(sparse_matrix))) #> [1] 7400 @@ -141,7 +139,7 @@ #> attr(,"package") #> [1] "DelayedArray" rle_matrix -#> <2000000 x 6> matrix of class RleMatrix and type "integer": +#> <2000000 x 6> RleMatrix object of type "integer": #> [,1] [,2] [,3] [,4] [,5] [,6] #> [1,] 2 2 1 1 1 2 #> [2,] 2 2 1 1 1 2 @@ -158,16 +156,16 @@ DelayedMatrixStats::colSums2(rle_matrix), times = 10) #> Unit: milliseconds -#> expr min lq mean -#> DelayedArray::colSums(rle_matrix) 556.293150 560.138822 586.0082 -#> DelayedMatrixStats::colSums2(rle_matrix) 4.113903 4.299225 13.5635 -#> median uq max neval -#> 577.59867 598.8189 639.46499 10 -#> 4.71228 14.2334 72.94384 10 +#> expr min lq mean +#> DelayedArray::colSums(rle_matrix) 364.1205 370.240414 373.245361 +#> DelayedMatrixStats::colSums2(rle_matrix) 1.2505 1.316879 4.175948 +#> median uq max neval +#> 374.097284 375.629659 381.29319 10 +#> 1.772102 1.882761 23.69242 10 profmem::total(profmem::profmem(DelayedArray::colSums(rle_matrix))) -#> [1] 168002536 +#> [1] 168003192 profmem::total(profmem::profmem(DelayedMatrixStats::colSums2(rle_matrix))) -#> [1] 1640 +#> [1] 1968 ``` ## Benchmarking @@ -177,88 +175,87 @@ ## API coverage -- ✔ = Implemented in **DelayedMatrixStats** -- ☑️ = Implemented in - [**DelayedArray**](http://bioconductor.org/packages/DelayedArray/) - or - [**sparseMatrixStats**](http://bioconductor.org/packages/sparseMatrixStats/) -- ❌: = Not yet implemented +- ✔ = Implemented in **DelayedMatrixStats** +- ☑️ = Implemented in + [**DelayedArray**](http://bioconductor.org/packages/DelayedArray/) or + [**sparseMatrixStats**](http://bioconductor.org/packages/sparseMatrixStats/) +- ❌: = Not yet implemented | Method | Block processing | *base::matrix* optimized | *Matrix::dgCMatrix* optimized | *Matrix::lgCMatrix* optimized | *DelayedArray::RleArray* (*SolidRleArraySeed*) optimized | *DelayedArray::RleArray* (*ChunkedRleArraySeed*) optimized | *HDF5Array::HDF5Matrix* optimized | *base::data.frame* optimized | *S4Vectors::DataFrame* optimized | |:-----------------------|:-----------------|:-------------------------|:------------------------------|:------------------------------|:---------------------------------------------------------|:-----------------------------------------------------------|:----------------------------------|:-----------------------------|:---------------------------------| -| `colAlls()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | -| `colAnyMissings()` | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | -| `colAnyNAs()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | -| `colAnys()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | -| `colAvgsPerRowSet()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | -| `colCollapse()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | -| `colCounts()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | -| `colCummaxs()` | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | -| `colCummins()` | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | -| `colCumprods()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | -| `colCumsums()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | -| `colDiffs()` | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | -| `colIQRDiffs()` | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | -| `colIQRs()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | -| `colLogSumExps()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | -| `colMadDiffs()` | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | -| `colMads()` | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | -| `colMaxs()` | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | -| `colMeans2()` | ✔ | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | -| `colMedians()` | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | -| `colMins()` | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | -| `colOrderStats()` | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | -| `colProds()` | ✔ | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | -| `colQuantiles()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | -| `colRanges()` | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | -| `colRanks()` | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | -| `colSdDiffs()` | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | -| `colSds()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | -| `colsum()` | ☑️ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | -| `colSums2()` | ✔ | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | -| `colTabulates()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | -| `colVarDiffs()` | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | -| `colVars()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | -| `colWeightedMads()` | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | -| `colWeightedMeans()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | -| `colWeightedMedians()` | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | -| `colWeightedSds()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | -| `colWeightedVars()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | -| `rowAlls()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | -| `rowAnyMissings()` | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | -| `rowAnyNAs()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | -| `rowAnys()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | -| `rowAvgsPerColSet()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | -| `rowCollapse()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | -| `rowCounts()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | -| `rowCummaxs()` | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | -| `rowCummins()` | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | -| `rowCumprods()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | -| `rowCumsums()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | -| `rowDiffs()` | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | -| `rowIQRDiffs()` | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | -| `rowIQRs()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | -| `rowLogSumExps()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | -| `rowMadDiffs()` | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | -| `rowMads()` | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | -| `rowMaxs()` | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | -| `rowMeans2()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | -| `rowMedians()` | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | -| `rowMins()` | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | -| `rowOrderStats()` | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | -| `rowProds()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | -| `rowQuantiles()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | -| `rowRanges()` | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | -| `rowRanks()` | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | -| `rowSdDiffs()` | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | -| `rowSds()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | -| `rowsum()` | ☑️ | ❌ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | -| `rowSums2()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | -| `rowTabulates()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | -| `rowVarDiffs()` | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | -| `rowVars()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | -| `rowWeightedMads()` | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | -| `rowWeightedMeans()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | -| `rowWeightedMedians()` | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | -| `rowWeightedSds()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | -| `rowWeightedVars()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | +| `colAlls()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | +| `colAnyMissings()` | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| `colAnyNAs()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | +| `colAnys()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | +| `colAvgsPerRowSet()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | +| `colCollapse()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | +| `colCounts()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | +| `colCummaxs()` | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| `colCummins()` | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| `colCumprods()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | +| `colCumsums()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | +| `colDiffs()` | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| `colIQRDiffs()` | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| `colIQRs()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | +| `colLogSumExps()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | +| `colMadDiffs()` | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| `colMads()` | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| `colMaxs()` | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| `colMeans2()` | ✔ | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | +| `colMedians()` | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| `colMins()` | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| `colOrderStats()` | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| `colProds()` | ✔ | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | +| `colQuantiles()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | +| `colRanges()` | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| `colRanks()` | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| `colSdDiffs()` | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| `colSds()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | +| `colsum()` | ☑️ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| `colSums2()` | ✔ | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | +| `colTabulates()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | +| `colVarDiffs()` | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| `colVars()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | +| `colWeightedMads()` | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| `colWeightedMeans()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | +| `colWeightedMedians()` | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| `colWeightedSds()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | +| `colWeightedVars()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | +| `rowAlls()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | +| `rowAnyMissings()` | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| `rowAnyNAs()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | +| `rowAnys()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | +| `rowAvgsPerColSet()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | +| `rowCollapse()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | +| `rowCounts()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | +| `rowCummaxs()` | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| `rowCummins()` | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| `rowCumprods()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | +| `rowCumsums()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | +| `rowDiffs()` | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| `rowIQRDiffs()` | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| `rowIQRs()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | +| `rowLogSumExps()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | +| `rowMadDiffs()` | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| `rowMads()` | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| `rowMaxs()` | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| `rowMeans2()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | +| `rowMedians()` | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| `rowMins()` | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| `rowOrderStats()` | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| `rowProds()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | +| `rowQuantiles()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | +| `rowRanges()` | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| `rowRanks()` | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| `rowSdDiffs()` | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| `rowSds()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | +| `rowsum()` | ☑️ | ❌ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| `rowSums2()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | +| `rowTabulates()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | +| `rowVarDiffs()` | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| `rowVars()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | +| `rowWeightedMads()` | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| `rowWeightedMeans()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | +| `rowWeightedMedians()` | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| `rowWeightedSds()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | +| `rowWeightedVars()` | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ | ❌ | diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/codecov.yml r-bioc-delayedmatrixstats-1.24.0+ds/codecov.yml --- r-bioc-delayedmatrixstats-1.22.6+ds/codecov.yml 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/codecov.yml 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -comment: false diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/debian/changelog r-bioc-delayedmatrixstats-1.24.0+ds/debian/changelog --- r-bioc-delayedmatrixstats-1.22.6+ds/debian/changelog 2023-09-04 08:06:06.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/debian/changelog 2023-11-30 02:01:09.000000000 +0000 @@ -1,3 +1,11 @@ +r-bioc-delayedmatrixstats (1.24.0+ds-1) unstable; urgency=medium + + * Team upload. + * New upstream version + * dh-update-R to update Build-Depends (routine-update) + + -- Charles Plessy Thu, 30 Nov 2023 02:01:09 +0000 + r-bioc-delayedmatrixstats (1.22.6+ds-1) unstable; urgency=medium * Team upload. diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/debian/control r-bioc-delayedmatrixstats-1.24.0+ds/debian/control --- r-bioc-delayedmatrixstats-1.22.6+ds/debian/control 2023-09-04 08:06:06.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/debian/control 2023-11-30 02:01:00.000000000 +0000 @@ -7,10 +7,9 @@ Build-Depends: debhelper-compat (= 13), dh-r, r-base-dev, - r-bioc-matrixgenerics (>= 1.12.1), - r-bioc-delayedarray (>= 0.26.7), - r-cran-matrixstats (>= 1.0.0), - r-bioc-sparsematrixstats, + r-bioc-matrixgenerics (>= 1.13.1), + r-bioc-delayedarray (>= 0.27.10), + r-bioc-sparsematrixstats (>= 1.13.2), r-cran-matrix (>= 1.5-0), r-bioc-s4vectors, r-bioc-iranges (>= 2.25.10) diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/debian/tests/autopkgtest-pkg-r.conf r-bioc-delayedmatrixstats-1.24.0+ds/debian/tests/autopkgtest-pkg-r.conf --- r-bioc-delayedmatrixstats-1.22.6+ds/debian/tests/autopkgtest-pkg-r.conf 2023-09-04 08:06:06.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/debian/tests/autopkgtest-pkg-r.conf 2023-11-30 02:00:13.000000000 +0000 @@ -1,7 +1,7 @@ extra_depends=r-cran-testthat, \ r-cran-knitr, \ r-cran-rmarkdown, \ - r-cran-covr, \ r-bioc-biocstyle, \ r-cran-profmem, \ - r-bioc-hdf5array + r-bioc-hdf5array, \ + r-cran-matrixstats (>= 1.0.0) diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/inst/NEWS.Rd r-bioc-delayedmatrixstats-1.24.0+ds/inst/NEWS.Rd --- r-bioc-delayedmatrixstats-1.22.6+ds/inst/NEWS.Rd 2023-07-29 14:00:52.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/inst/NEWS.Rd 2023-10-24 18:28:57.000000000 +0000 @@ -2,8 +2,8 @@ \title{News for Package \pkg{DelayedMatrixStats}} \encoding{UTF-8} -\section{Version 1.22.1}{\itemize{ - \item Modify calls to \pkg{matrixStats} functions to mitigate non-backward comptible changes in \pkg{matrixStats} 1.0.0. More precisely: (1) \code{useNames=NA} became deprecated in \pkg{matrixStats} 1.0.0 so we make sure to never pass \code{useNames=NA} when calling a \pkg{matrixStats} function; (2) furthermore, we make sure to pass a \code{useNames} value that preserves the pre-\pkg{matrixStats} 1.0.0 behavior in order to avoid disruption. See https://github.com/Bioconductor/MatrixGenerics/issues/31 for a discussion of these changes. +\section{Version 1.23}{\itemize{ + \item \code{colAnyMissings()} and \code{rowAnyMissings()} are deprecated in favour of the long-recommended \code{colAnyNAs()} and \code{rowAnyNAs()}. These deprecated functions will be made defunct in the next release cycle. }} \section{Version 1.14.0}{\itemize{ diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/inst/doc/DelayedMatrixStatsOverview.R r-bioc-delayedmatrixstats-1.24.0+ds/inst/doc/DelayedMatrixStatsOverview.R --- r-bioc-delayedmatrixstats-1.22.6+ds/inst/doc/DelayedMatrixStatsOverview.R 2023-08-28 20:30:23.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/inst/doc/DelayedMatrixStatsOverview.R 2023-10-24 20:59:01.000000000 +0000 @@ -1,4 +1,4 @@ -## ---- include = FALSE, setup-------------------------------------------------- +## ----include = FALSE, setup--------------------------------------------------- knitr::opts_chunk$set(echo = TRUE, comment = "#>", collapse = TRUE, message = FALSE) library(BiocStyle) @@ -160,3 +160,6 @@ ## ----colSums2_sin------------------------------------------------------------- all.equal(colSums2(sin_dm_matrix), colSums(sin(as.matrix(dm_matrix)))) +## ----------------------------------------------------------------------------- +sessionInfo() + diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/inst/doc/DelayedMatrixStatsOverview.Rmd r-bioc-delayedmatrixstats-1.24.0+ds/inst/doc/DelayedMatrixStatsOverview.Rmd --- r-bioc-delayedmatrixstats-1.22.6+ds/inst/doc/DelayedMatrixStatsOverview.Rmd 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/inst/doc/DelayedMatrixStatsOverview.Rmd 2023-10-24 18:28:57.000000000 +0000 @@ -333,3 +333,9 @@ `r Biocpkg("DelayedMatrixStats")`, package developers will be able to focus on higher level programming tasks and address important scientific questions and technological challenges in high-throughput biology. + +# Session info + +```{r} +sessionInfo() +``` \ No newline at end of file diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/longtests/testthat/helper_test_data.R r-bioc-delayedmatrixstats-1.24.0+ds/longtests/testthat/helper_test_data.R --- r-bioc-delayedmatrixstats-1.22.6+ds/longtests/testthat/helper_test_data.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/longtests/testthat/helper_test_data.R 1970-01-01 00:00:00.000000000 +0000 @@ -1,223 +0,0 @@ -### ============================================================================ -### Integer and numeric matrix-like objects used in tests -### - -### ---------------------------------------------------------------------------- -### List of matrix objects -### - -# NOTE: These examples, adapted from those used in unit tests of matrixStats, -# are chosen to cover various corner cases sometimes encountered when -# operating on matrices. - -modes <- c("integer", "double", "logical") -names(modes) <- modes -# NOTE: Largest matrix has `nrow` rows and `ncol` columns -matrix_list <- unlist( - x = lapply(modes, function(mode, nrow = 3L, ncol = 4L) { - - # Base case: nrow * ncol matrix with no NA elements and with dimnames - x <- matrix( - data = seq(1 - (nrow * ncol) / 2, (nrow * ncol) / 2), - nrow = nrow, - ncol = ncol, - dimnames = list(paste0("R", seq_len(nrow)), paste0("C", seq_len(ncol)))) - storage.mode(x) <- mode - - # Special case: Single-element matrix - x_1x1 <- x[1, 1, drop = FALSE] - - # Special case: Empty matrix - x_empty <- x[0, 0] - - # Special case: All NAs - x_all_NA <- matrix( - data = NA, - nrow = nrow, - ncol = ncol, - dimnames = list(paste0("R", seq_len(nrow)), paste0("C", seq_len(ncol)))) - storage.mode(x_all_NA) <- mode - - # Special case: All NaNs - x_all_NaN <- matrix( - data = NaN, - nrow = nrow, - ncol = ncol, - dimnames = list(paste0("R", seq_len(nrow)), paste0("C", seq_len(ncol)))) - storage.mode(x_all_NaN) <- mode - - # Special case: All NAs and NaNs - x_all_NA_or_NaN <- matrix( - data = c(NA, NaN), - nrow = nrow, - ncol = ncol, - dimnames = list(paste0("R", seq_len(nrow)), paste0("C", seq_len(ncol)))) - storage.mode(x_all_NA_or_NaN) <- mode - - if (mode == "double") { - # Special case: All Inf - x_all_Inf <- matrix( - data = Inf, - nrow = nrow, - ncol = ncol, - dimnames = list(paste0("R", seq_len(nrow)), paste0("C", seq_len(ncol)))) - storage.mode(x_all_Inf) <- mode - - # Special case: All -Inf - x_all_neg_Inf <- matrix( - data = -Inf, - nrow = nrow, - ncol = ncol, - dimnames = list(paste0("R", seq_len(nrow)), paste0("C", seq_len(ncol)))) - storage.mode(x_all_neg_Inf) <- mode - - # Special case: Inf and -Inf - x_all_Inf_or_neg_Inf <- matrix( - data = c(Inf, -Inf), - nrow = nrow, - ncol = ncol, - dimnames = list(paste0("R", seq_len(nrow)), paste0("C", seq_len(ncol)))) - storage.mode(x_all_Inf_or_neg_Inf) <- mode - - val <- list( - "base_case" = x, - "1x1" = x_1x1, - "empty" = x_empty, - "all_NA" = x_all_NA, - "all_NaN" = x_all_NaN, - "all_Inf" = x_all_Inf, - "all_neg_Inf" = x_all_neg_Inf, - "all_Inf_or_neg_Inf" = x_all_Inf_or_neg_Inf, - "all_NA_or_NaN" = x_all_NA_or_NaN) - } else { - val <- list( - "base_case" = x, - "1x1" = x_1x1, - "empty" = x_empty, - "all_NA" = x_all_NA, - "all_NaN" = x_all_NaN, - "all_NA_or_NaN" = x_all_NA_or_NaN) - } - }), - recursive = FALSE) - -### ---------------------------------------------------------------------------- -### List of objects to be used as seeds -### - -# NOTE: The classes of objects that can be used as a seed can be divided into -# two camps: -# 1. Data seeds: These store matrix-like data, where the data is -# in-memory or on-disk. -# 2. DelayedOp seeds: These store delayed operations. - -data_seeds <- c( - "matrix", - "Matrix", - "sparseMatrix", - "SolidRleArraySeed", - "ChunkedRleArraySeed", - "HDF5ArraySeed") -delayed_op_seeds <- c( - "DelayedSubset", - "DelayedAperm", - "DelayedUnaryIsoOpStack", - "DelayedUnaryIsoOpWithArgs", - "DelayedSetDimnames", - "DelayedNaryIsoOp", - "DelayedAbind") -seed_classes <- data_seeds -seed_classes <- c(data_seeds, delayed_op_seeds) -names(seed_classes) <- seed_classes - -seedFunFactory <- function(seed_class) { - # NOTE: All DelayedOps are designed to be no-ops - switch( - seed_class, - "matrix" = identity, - "Matrix" = function(x) { - if (identical(dim(x), c(1L, 1L))) { - # NOTE: `Matrix()` called on a 1x1 matrix will return a diagonal - # (`doDiag = TRUE`), symmetric (`doDiag = FALSE`), or triangular - # (`doDiag = FALSE` and non-symmetric dimanems) matrix, but here - # we always want the more-general sparse matrix and so have to - # do some shenanigans to ensure that is achieved. - if (is.logical(x)) { - return(as(as(as(x, "lMatrix"), "generalMatrix"), "unpackedMatrix")) - } else { - return(as(as(as(x, "dMatrix"), "generalMatrix"), "unpackedMatrix")) - } - } - Matrix::Matrix(x) - }, - "sparseMatrix" = function(x) { - if (identical(dim(x), c(1L, 1L))) { - # NOTE: `Matrix()` called on a 1x1 matrix will return a diagonal - # (`doDiag = TRUE`), symmetric (`doDiag = FALSE`), or triangular - # (`doDiag = FALSE` and non-symmetric dimanems) matrix, but here - # we always want the more-general sparse matrix and so have to - # do some shenanigans to ensure that is achieved. - if (is.logical(x)) { - return(as(as(as(x, "lMatrix"), "generalMatrix"), "CsparseMatrix")) - } else { - return(as(x, "dgCMatrix")) - } - } - Matrix::Matrix(x, sparse = TRUE) - }, - "SolidRleArraySeed" = function(x) { - seed(RleArray(Rle(x), dim(x), dimnames(x), chunksize = NULL)) - }, - "ChunkedRleArraySeed" = function(x) { - seed(RleArray(Rle(x), dim(x), dimnames(x), chunksize = nrow(x))) - }, - "HDF5ArraySeed" = function(x) seed(realize(x = x, BACKEND = "HDF5Array")), - "DelayedSubset" = DelayedArray:::new_DelayedSubset, - "DelayedAperm" = DelayedArray:::new_DelayedAperm, - "DelayedUnaryIsoOpStack" = DelayedArray:::new_DelayedUnaryIsoOpStack, - "DelayedUnaryIsoOpWithArgs" = DelayedArray:::new_DelayedUnaryIsoOpWithArgs, - "DelayedSetDimnames" = function(x) { - DelayedArray:::new_DelayedSetDimnames(seed = x, dimnames = dimnames(x)) - }, - "DelayedNaryIsoOp" = function(x) DelayedArray:::new_DelayedNaryIsoOp(seed=x), - "DelayedAbind" = function(x) { - if (nrow(x)) { - seeds <- list( - x[seq_len(nrow(x) - 1), , drop = FALSE], - x[nrow(x), , drop = FALSE]) - } else { - seeds <- list(x, x) - } - DelayedArray:::new_DelayedAbind(seeds = seeds, along = 1L) - } - ) -} - -seed_funs <- Map(seedFunFactory, seed_classes) -seed_list <- unlist( - x = Map(function(f) Map(f, matrix_list), seed_funs), - recursive = FALSE) - -### ---------------------------------------------------------------------------- -### List of DelayedMatrix objects -### - -# NOTE: Temporarily disable seed simplification to ensure DelayedOps are -# "simplified away". -options("DelayedArray.simplify" = FALSE) -DelayedMatrix_list <- Map(DelayedArray, seed_list) -options("DelayedArray.simplify" = TRUE) - -# ### ---------------------------------------------------------------------------- -# ### Check all DelayedMatrix objects match the matrix when as.matrix() -# ### -# -# TODO: Should this be a formal test? Not all tests will pass, e.g., -# HDF5ArraySeed don't carry dimnames -# a <- Map( -# all.equal, -# Map(as.matrix, DelayedMatrix_list), -# matrix_list) -# i <- !sapply(a, isTRUE) -# TODO: Look at all these failures and fix -# names(a[i]) diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/longtests/testthat/test_GitHub_issues.R r-bioc-delayedmatrixstats-1.24.0+ds/longtests/testthat/test_GitHub_issues.R --- r-bioc-delayedmatrixstats-1.22.6+ds/longtests/testthat/test_GitHub_issues.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/longtests/testthat/test_GitHub_issues.R 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -context("GitHub issues") - -test_that("Issue 54 is fixed", { - # NOTE: This is a slow-ish test, so don't test when running tests with small - # block size. - skip_if(getAutoBlockSize() == 8) - - # Small normal matrix - m1 <- DelayedArray(as.matrix(iris[, 1:4])) - expect_equal( - rowsum(as.matrix(m1), iris$Species), - rowsum(m1, iris$Species)) - - # Large sparse matrix - x <- Matrix::rsparsematrix(800000, ncol = 50, density = 0.1) - - # Large normal matrix - m2 <- DelayedArray(as.matrix(x)) - S <- sample(1:1000, nrow(m2), replace = TRUE) - expect_equal( - rowsum(as.matrix(m2), S), - rowsum(m2, S)) - - # dgCMatrix - m4 <- DelayedArray(x) - S <- sample(1:1000, nrow(m4), replace = TRUE) - expect_equal( - rowsum(as.matrix(m4), S), - rowsum(m4, S)) - - # RleMatrix - # NOTE: This test fails on 32-bit Windows because it can't allocate a ~150 Mb - # vector. - skip_on_os("windows") - m3 <- as(m2, "RleMatrix") - S <- sample(1:1000, nrow(m3), replace = TRUE) - expect_equal( - rowsum(as.matrix(m3), S), - rowsum(m3, S) - ) -}) diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/longtests/testthat/test_manifest.csv r-bioc-delayedmatrixstats-1.24.0+ds/longtests/testthat/test_manifest.csv --- r-bioc-delayedmatrixstats-1.22.6+ds/longtests/testthat/test_manifest.csv 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/longtests/testthat/test_manifest.csv 1970-01-01 00:00:00.000000000 +0000 @@ -1,75 +0,0 @@ -Function,test_integer,test_double,test_logical,testDefaultArgs,testNonNullRowsAndCols,testGroup,Notes -colAlls,TRUE,TRUE,TRUE,TRUE,TRUE,FALSE, -colAnyMissings,TRUE,TRUE,TRUE,TRUE,TRUE,FALSE, -colAnyNAs,TRUE,TRUE,TRUE,TRUE,TRUE,FALSE, -colAnys,TRUE,TRUE,TRUE,TRUE,TRUE,FALSE, -colAvgsPerRowSet,TRUE,TRUE,TRUE,FALSE,FALSE,FALSE, -colCollapse,TRUE,TRUE,TRUE,FALSE,FALSE,FALSE, -colCounts,TRUE,TRUE,TRUE,TRUE,TRUE,FALSE, -colCummaxs,TRUE,TRUE,FALSE,TRUE,TRUE,FALSE, -colCummins,TRUE,TRUE,FALSE,TRUE,TRUE,FALSE, -colCumprods,TRUE,TRUE,FALSE,TRUE,TRUE,FALSE, -colCumsums,TRUE,TRUE,FALSE,TRUE,TRUE,FALSE, -colDiffs,TRUE,TRUE,FALSE,FALSE,TRUE,FALSE,Default doesn't work because cant't have NA/NaN unless na.rm = TRUE -colIQRDiffs,TRUE,TRUE,FALSE,FALSE,TRUE,FALSE, -colIQRs,TRUE,TRUE,TRUE,FALSE,TRUE,FALSE,Default doesn't work because cant't have NA/NaN unless na.rm = TRUE -colLogSumExps,FALSE,TRUE,FALSE,TRUE,TRUE,FALSE, -colMadDiffs,TRUE,TRUE,FALSE,TRUE,TRUE,FALSE, -colMads,TRUE,TRUE,FALSE,TRUE,FALSE,FALSE, -colMaxs,TRUE,TRUE,FALSE,TRUE,FALSE,FALSE, -colMeans2,TRUE,TRUE,TRUE,TRUE,TRUE,FALSE, -colMedians,TRUE,TRUE,FALSE,TRUE,FALSE,FALSE, -colMins,TRUE,TRUE,FALSE,TRUE,FALSE,FALSE, -colOrderStats,TRUE,TRUE,FALSE,FALSE,FALSE,FALSE, -colProds,TRUE,TRUE,TRUE,TRUE,TRUE,FALSE, -colQuantiles,TRUE,TRUE,FALSE,TRUE,TRUE,FALSE, -colRanges,TRUE,TRUE,FALSE,TRUE,FALSE,FALSE,DelayedArray::colRanges() doesn't support `cols` or `rows` -colRanks,TRUE,TRUE,FALSE,TRUE,TRUE,FALSE, -colSdDiffs,TRUE,TRUE,FALSE,TRUE,TRUE,FALSE, -colSds,TRUE,TRUE,FALSE,TRUE,FALSE,FALSE, -colSums2,TRUE,TRUE,TRUE,TRUE,TRUE,FALSE, -colTabulates,TRUE,FALSE,TRUE,FALSE,FALSE,FALSE,"colTabulates() only accepts integer, logical, and raw. When the DelayedMatrix seed is a Matrix, there is integer matrices are using doubles" -colVarDiffs,TRUE,TRUE,FALSE,TRUE,TRUE,FALSE, -colVars,TRUE,TRUE,FALSE,TRUE,FALSE,FALSE, -colWeightedMads,TRUE,TRUE,FALSE,TRUE,TRUE,FALSE, -colWeightedMeans,TRUE,TRUE,TRUE,TRUE,TRUE,FALSE, -colWeightedMedians,TRUE,TRUE,FALSE,TRUE,TRUE,FALSE, -colWeightedSds,TRUE,TRUE,TRUE,TRUE,TRUE,FALSE, -colWeightedVars,TRUE,TRUE,FALSE,TRUE,TRUE,FALSE, -rowAlls,TRUE,TRUE,TRUE,TRUE,TRUE,FALSE, -rowAnyMissings,TRUE,TRUE,TRUE,TRUE,TRUE,FALSE, -rowAnyNAs,TRUE,TRUE,TRUE,TRUE,TRUE,FALSE, -rowAnys,TRUE,TRUE,TRUE,TRUE,TRUE,FALSE, -rowAvgsPerColSet,TRUE,TRUE,TRUE,FALSE,FALSE,FALSE, -rowCollapse,TRUE,TRUE,TRUE,FALSE,FALSE,FALSE, -rowCounts,TRUE,TRUE,TRUE,TRUE,TRUE,FALSE, -rowCummaxs,TRUE,TRUE,FALSE,TRUE,TRUE,FALSE, -rowCummins,TRUE,TRUE,FALSE,TRUE,TRUE,FALSE, -rowCumprods,TRUE,TRUE,FALSE,TRUE,TRUE,FALSE, -rowCumsums,TRUE,TRUE,FALSE,TRUE,TRUE,FALSE, -rowDiffs,TRUE,TRUE,FALSE,FALSE,TRUE,FALSE,Default doesn't work because cant't have NA/NaN unless na.rm = TRUE -rowIQRDiffs,TRUE,TRUE,FALSE,FALSE,TRUE,FALSE, -rowIQRs,TRUE,TRUE,TRUE,FALSE,TRUE,FALSE,Default doesn't work because cant't have NA/NaN unless na.rm = TRUE -rowLogSumExps,FALSE,TRUE,FALSE,TRUE,TRUE,FALSE, -rowMadDiffs,TRUE,TRUE,FALSE,TRUE,TRUE,FALSE, -rowMads,TRUE,TRUE,FALSE,TRUE,FALSE,FALSE, -rowMaxs,TRUE,TRUE,FALSE,TRUE,FALSE,FALSE, -rowMeans2,TRUE,TRUE,TRUE,TRUE,TRUE,FALSE, -rowMedians,TRUE,TRUE,FALSE,TRUE,FALSE,FALSE, -rowMins,TRUE,TRUE,FALSE,TRUE,FALSE,FALSE, -rowOrderStats,TRUE,TRUE,FALSE,FALSE,FALSE,FALSE, -rowProds,TRUE,TRUE,TRUE,TRUE,TRUE,FALSE, -rowQuantiles,TRUE,TRUE,FALSE,TRUE,TRUE,FALSE, -rowRanges,TRUE,TRUE,FALSE,TRUE,FALSE,FALSE,DelayedArray::colRanges() doesn't support `cols` or `rows` -rowRanks,TRUE,TRUE,FALSE,TRUE,TRUE,FALSE, -rowSdDiffs,TRUE,TRUE,FALSE,TRUE,TRUE,FALSE, -rowSds,TRUE,TRUE,FALSE,TRUE,FALSE,FALSE, -rowSums2,TRUE,TRUE,TRUE,TRUE,TRUE,FALSE, -rowTabulates,TRUE,FALSE,TRUE,FALSE,FALSE,FALSE,"colTabulates() only accepts integer, logical, and raw. When the DelayedMatrix seed is a Matrix, there is integer matrices are using doubles" -rowVarDiffs,TRUE,TRUE,FALSE,TRUE,TRUE,FALSE, -rowVars,TRUE,TRUE,FALSE,TRUE,FALSE,FALSE, -rowWeightedMads,TRUE,TRUE,FALSE,TRUE,TRUE,FALSE, -rowWeightedMeans,TRUE,TRUE,TRUE,TRUE,TRUE,FALSE, -rowWeightedMedians,TRUE,TRUE,FALSE,TRUE,TRUE,FALSE, -rowWeightedSds,TRUE,TRUE,TRUE,TRUE,TRUE,FALSE, -rowWeightedVars,TRUE,TRUE,FALSE,TRUE,TRUE,FALSE, diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/longtests/testthat/test_quantile.R r-bioc-delayedmatrixstats-1.24.0+ds/longtests/testthat/test_quantile.R --- r-bioc-delayedmatrixstats-1.22.6+ds/longtests/testthat/test_quantile.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/longtests/testthat/test_quantile.R 1970-01-01 00:00:00.000000000 +0000 @@ -1,80 +0,0 @@ -# Some special tests for the row/colQuantiles functions. -# library(DelayedMatrixStats); library(testthat); source("test_quantile.R") - -test_that("colQuantiles correctly handle the drop= argument", { - x <- matrix(runif(100000), nrow=10) - colnames(x) <- sprintf("THING%i", seq_len(ncol(x))) - - # Handles a length-1 prob. - expect_identical( - colQuantiles(DelayedArray(x) + 1, prob=0.5), - colQuantiles(x + 1, prob=0.5) - ) - - expect_identical( - colQuantiles(DelayedArray(x) + 1, prob=0.5, drop=FALSE), - colQuantiles(x + 1, prob=0.5, drop=FALSE) - ) - - # Handles multiple dimensions correctly. - multiple <- c(0.2, 0.5, 0.7) - expect_identical( - colQuantiles(DelayedArray(x) + 1, prob=multiple), - colQuantiles(x + 1, prob=multiple) - ) - - expect_identical( - colQuantiles(DelayedArray(x) + 1, prob=multiple, drop=FALSE), - colQuantiles(x + 1, prob=multiple, drop=FALSE) - ) - - # Handling a 1-dimensional input. - expect_identical( - colQuantiles(DelayedArray(x)[,1,drop=FALSE], prob=multiple), - colQuantiles(x[,1,drop=FALSE], prob=multiple) - ) - - expect_identical( - colQuantiles(DelayedArray(x)[,1,drop=FALSE], prob=multiple, drop=FALSE), - colQuantiles(x[,1,drop=FALSE], prob=multiple, drop=FALSE) - ) -}) - -test_that("rowQuantiles correctly handle the drop= argument", { - x <- matrix(runif(100000), nrow=10) - rownames(x) <- sprintf("THING%i", seq_len(nrow(x))) - - # Handles a length-1 prob. - expect_identical( - rowQuantiles(DelayedArray(x) + 1, prob=0.5), - rowQuantiles(x + 1, prob=0.5) - ) - - expect_identical( - rowQuantiles(DelayedArray(x) + 1, prob=0.5, drop=FALSE), - rowQuantiles(x + 1, prob=0.5, drop=FALSE) - ) - - # Handles multiple dimensions properly. - multiple <- c(0.2, 0.5, 0.7) - expect_identical( - rowQuantiles(DelayedArray(x) + 1, prob=multiple), - rowQuantiles(x + 1, prob=multiple) - ) - - expect_identical( - rowQuantiles(DelayedArray(x) + 1, prob=multiple, drop=FALSE), - rowQuantiles(x + 1, prob=multiple, drop=FALSE) - ) - - # Handling a 1-dimensional input. - expect_identical( - rowQuantiles(DelayedArray(x)[1,,drop=FALSE], prob=multiple), - rowQuantiles(x[1,,drop=FALSE], prob=multiple) - ) - - expect_identical( - rowQuantiles(DelayedArray(x)[1,,drop=FALSE], prob=multiple, drop=FALSE), - rowQuantiles(x[1,,drop=FALSE], prob=multiple, drop=FALSE) - ) -}) diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/longtests/testthat/test_row_and_col_functions.R r-bioc-delayedmatrixstats-1.24.0+ds/longtests/testthat/test_row_and_col_functions.R --- r-bioc-delayedmatrixstats-1.22.6+ds/longtests/testthat/test_row_and_col_functions.R 2023-08-10 18:05:57.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/longtests/testthat/test_row_and_col_functions.R 1970-01-01 00:00:00.000000000 +0000 @@ -1,167 +0,0 @@ -### ============================================================================ -### Load manifest. -### - -# NOTE: The manifest lists which unit tests are to be applied to each function -test_manifest <- read.csv( - file = "test_manifest.csv", - stringsAsFactors = FALSE) - -# ------------------------------------------------------------------------------ -# Helper functions -# - -filterMatrixList <- function(list, test_integer, test_double, test_logical) { - if (!test_integer) { - list <- list[!grepl("integer", names(list))] - } - if (!test_double) { - list <- list[!grepl("double", names(list))] - } - if (!test_logical) { - list <- list[!grepl("logical", names(list))] - } - list -} - -# Should dimnames be checked? There are reasons for not checking these: -# - A HDF5Matrix cannot have dimnames -# - A 0x0 DelayedMatrix may have dimnames set as `NULL` or `list(NULL, NULL)` -checkAttributes <- function(DelayedMatrix_list) { - Map( - f = function(x) !is(x, "HDF5Matrix") && !identical(dim(x), c(0L, 0L)), - DelayedMatrix_list) -} - -expect_equal_DA <- function(object, expected, ...) { - expect_equal(as.matrix(object), as.matrix(expected), ...) -} - -# ------------------------------------------------------------------------------ -# Unit test functions -# - -testDefaultArgs <- function(matrix_list, DelayedMatrix_list) { - test_that("Default arguments", { - check.attributes <- checkAttributes(DelayedMatrix_list) - expecteds <- Map(mg_f, matrix_list) - observeds <- Map(dms_f, DelayedMatrix_list) - Map(expect_equal, observeds, expecteds, check.attributes = check.attributes) - }) -} - -testNonNullRowsAndCols <- function(matrix_list, DelayedMatrix_list) { - test_that("Non-NULL rows and cols", { - # NOTE: Only run these tests on 'base_case' - matrix_list <- matrix_list[grep("base_case", names(matrix_list))] - DelayedMatrix_list <- DelayedMatrix_list[ - grep("base_case", names(DelayedMatrix_list))] - check.attributes <- checkAttributes(DelayedMatrix_list) - rows_list <- list(c(3, 2)) - cols_list <- list(c(1, 3)) - expecteds <- Map( - f = mg_f, - matrix_list, - rows = rows_list, - cols = cols_list) - observeds <- Map( - f = dms_f, - DelayedMatrix_list, - rows = rows_list, - cols = cols_list) - Map(expect_equal, observeds, expecteds, check.attributes = check.attributes) - }) -} - -testGroup <- function(matrix_list, DelayedMatrix_list) { - test_that("Default arguments (group)", { - # NOTE: Only run these tests on 'base_case' - matrix_list <- matrix_list[grep("base_case", names(matrix_list))] - DelayedMatrix_list <- DelayedMatrix_list[ - grep("base_case", names(DelayedMatrix_list))] - check.attributes <- checkAttributes(DelayedMatrix_list) - if (any(grepl("col", body(dms_f)))) { - group_list <- list(c(1, 2, 2, 2)) - } else { - group_list <- list(c(1, 1, 2)) - } - expecteds <- Map(mg_f, matrix_list, group = group_list) - observeds <- Map(dms_f, DelayedMatrix_list, group = group_list) - Map(expect_equal_DA, observeds, expecteds, - check.attributes = check.attributes) - }) -} - -# ------------------------------------------------------------------------------ -# Run unit tests -# - -for (i in seq_len(nrow(test_manifest))) { - - # Get the function to be tested - f <- test_manifest[i, "Function"] - - # This hack is to preserve the `useNames = FALSE` behaviour of - # colAnyMissings/rowAnyMissings in BioC <= BioC 3.17 and matrixStats < 1.0.0 - # in BioC == 3.17 with matrixStats == 1.0.0. - # colAnyMissings/rowAnyMissings are effectively aliases for - # colAnyNAs/rowAnyNAs and will be deprecated in the next release. - if (f == "colAnyMissings") { - f <- "colAnyNAs" - } else if (f == "rowAnyMissings") { - f <- "rowAnyNAs" - } - # A clunky hack to get MatrixGenerics::f - mg_f <- get(f, envir = environment(MatrixGenerics::colSums2)) - dms_f <- get(f) - context(f) - - # Filter out those storage modes not to be tested - test_integer <- test_manifest[i, "test_integer"] - test_double <- test_manifest[i, "test_double"] - test_logical <- test_manifest[i, "test_logical"] - filtered_matrix_list <- filterMatrixList( - list = matrix_list, - test_integer = test_integer, - test_double = test_double, - test_logical = test_logical) - filtered_DelayedMatrix_list <- filterMatrixList( - list = DelayedMatrix_list, - test_integer = test_integer, - test_double = test_double, - test_logical = test_logical) - # NOTE: Strip dimnames if testing colMaxs/rowMaxs or colMins/rowMins. The - # DelayedArary-methods for these functions are defined in DelayedArray - # rather than DelayedMatrixStats and these have always propagated the - # names. So this is a workaround for a temporary discordance between - # matrixStats::f() and MatrixGenerics::f() [which resolves to - # DelayedArray::f()] for these functions and how they treat names. - # This hack is only applicable for BioC 3.17 because starting with BioC - # 3.18 the naming behaviour of these DelayedArray::f() is consistent - # with matrixStats and MatrixGenerics. - # See https://github.com/Bioconductor/DelayedArray/issues/107 for - # further details and discussion. - if (f %in% c("colMaxs", "colMins", "rowMaxs", "rowMins")) { - filtered_matrix_list <- lapply(filtered_matrix_list, unname) - filtered_DelayedMatrix_list <- lapply(filtered_DelayedMatrix_list, unname) - } - - # Run selected tests - if (test_manifest[i, "testDefaultArgs"]) { - testDefaultArgs(filtered_matrix_list, filtered_DelayedMatrix_list) - } - if (test_manifest[i, "testNonNullRowsAndCols"]) { - testNonNullRowsAndCols(filtered_matrix_list, filtered_DelayedMatrix_list) - } - if (test_manifest[i, "testGroup"]) { - testGroup(filtered_matrix_list, filtered_DelayedMatrix_list) - } -} - -# TODO: Test with transposing -# TODO: Test other arguments -# TODO: When there's an error, want to report class of object and expected, -# possibly even str(), to make it easier to figure out which test failed -# TODO: When `test_integer`, `test_double` or `test_logical` is FALSE, check -# that an error really occurs if matrixStats::foo() is given that input -# TODO: Add column to manifest that allows all a functions tests to be skipped diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/longtests/testthat.R r-bioc-delayedmatrixstats-1.24.0+ds/longtests/testthat.R --- r-bioc-delayedmatrixstats-1.22.6+ds/longtests/testthat.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/longtests/testthat.R 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -library(testthat) -library(DelayedMatrixStats) - -setAutoBlockSize(8) -test_check("DelayedMatrixStats") diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/man/DelayedMatrixStats-deprecated.Rd r-bioc-delayedmatrixstats-1.24.0+ds/man/DelayedMatrixStats-deprecated.Rd --- r-bioc-delayedmatrixstats-1.22.6+ds/man/DelayedMatrixStats-deprecated.Rd 1970-01-01 00:00:00.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/man/DelayedMatrixStats-deprecated.Rd 2023-10-24 18:28:57.000000000 +0000 @@ -0,0 +1,94 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/AllGenerics.R, R/colAnyMissings.R, +% R/rowAnyMissings.R +\name{DelayedMatrixStats-deprecated} +\alias{DelayedMatrixStats-deprecated} +\alias{colAnyMissings} +\alias{rowAnyMissings} +\alias{colAnyMissings,DelayedMatrix-method} +\alias{colAnyMissings,matrix-method} +\alias{rowAnyMissings,DelayedMatrix-method} +\alias{rowAnyMissings,matrix-method} +\title{Deprecated functions in package \sQuote{DelayedMatrixStats}} +\usage{ +colAnyMissings(x, rows = NULL, cols = NULL, ..., useNames = NA) + +rowAnyMissings(x, rows = NULL, cols = NULL, ..., useNames = NA) + +\S4method{colAnyMissings}{DelayedMatrix}( + x, + rows = NULL, + cols = NULL, + force_block_processing = FALSE, + ..., + useNames = TRUE +) + +\S4method{colAnyMissings}{matrix}(x, rows = NULL, cols = NULL, ..., useNames = TRUE) + +\S4method{rowAnyMissings}{DelayedMatrix}( + x, + rows = NULL, + cols = NULL, + force_block_processing = FALSE, + ..., + useNames = TRUE +) + +\S4method{rowAnyMissings}{matrix}(x, rows = NULL, cols = NULL, ..., useNames = TRUE) +} +\arguments{ +\item{x}{A NxK \linkS4class{DelayedMatrix}.} + +\item{rows, cols}{A \code{\link{vector}} indicating the subset of rows +(and/or columns) to operate over. If \code{\link{NULL}}, no subsetting is +done.} + +\item{...}{Additional arguments passed to specific methods.} + +\item{useNames}{If \code{\link{NA}}, the default behavior of the function about naming support is remained. If \code{\link{FALSE}}, no naming support is done. Else if \code{\link{TRUE}}, names attributes of result are set.} + +\item{force_block_processing}{\code{FALSE} (the default) means that a +seed-aware, optimised method is used (if available). This can be overridden +to use the general block-processing strategy by setting this to \code{TRUE} +(typically not advised). The block-processing strategy loads one or more +(depending on \verb{\link[DelayedArray]\{getAutoBlockSize\}()}) columns (\code{colFoo()}) +or rows (\code{rowFoo()}) into memory as an ordinary \link[base:array]{base::array}.} +} +\value{ +Returns a \code{\link{logical}} \code{\link{vector}} of length N (K). +} +\description{ +These functions are provided for compatibility with older +versions of \sQuote{DelayedMatrixStats} only, and will be defunct at the +next release. +} +\details{ +The following functions are deprecated and will be made defunct; +use the replacement indicated below: +\itemize{ +\item{colAnyMissings: \code{\link{colAnyNAs}}} +\item{rowAnyMissings: \code{\link{rowAnyNAs}}} +} +} +\examples{ +mat <- matrix(rnorm(15), nrow = 5, ncol = 3) +mat[2, 1] <- NA +mat[3, 3] <- Inf +mat[4, 1] <- 0 + +print(mat) + +rowAnyNAs(mat) +colAnyNAs(mat) +} +\seealso{ +\itemize{ +\item \code{matrixStats::\link[matrixStats:anyMissing]{rowAnyNAs}()} and +\code{matrixStats::\link[matrixStats:anyMissing]{colAnyNAs}()} which are +used when the input is a \code{matrix} or \code{numeric} vector. +\item For checks if any element is equal to a value, see +\code{\link[MatrixGenerics]{rowAnys}()}. +\item \code{base::\link{is.na}()} and \code{base::\link{any}()}. +} +} diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/man/colAlls.Rd r-bioc-delayedmatrixstats-1.24.0+ds/man/colAlls.Rd --- r-bioc-delayedmatrixstats-1.22.6+ds/man/colAlls.Rd 2023-06-09 18:04:41.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/man/colAlls.Rd 2023-10-24 18:28:57.000000000 +0000 @@ -17,7 +17,7 @@ na.rm = FALSE, force_block_processing = FALSE, ..., - useNames = NA + useNames = TRUE ) \S4method{colAnys}{DelayedMatrix}( @@ -28,7 +28,7 @@ na.rm = FALSE, force_block_processing = FALSE, ..., - useNames = NA + useNames = TRUE ) \S4method{rowAlls}{DelayedMatrix}( @@ -39,7 +39,7 @@ na.rm = FALSE, force_block_processing = FALSE, ..., - useNames = NA + useNames = TRUE ) \S4method{rowAnys}{DelayedMatrix}( @@ -50,7 +50,7 @@ na.rm = FALSE, force_block_processing = FALSE, ..., - useNames = NA + useNames = TRUE ) } \arguments{ @@ -75,7 +75,7 @@ \item{...}{Additional arguments passed to specific methods.} -\item{useNames}{If \code{\link{NA}}, the default behavior of the function about naming support is remained. If \code{\link{FALSE}}, no naming support is done. Else if \code{\link{TRUE}}, names attributes of result are set. \strong{Only \code{useNames = NA} is currently supported, other values are silently ignored.}} +\item{useNames}{If \code{\link{NA}}, the default behavior of the function about naming support is remained. If \code{\link{FALSE}}, no naming support is done. Else if \code{\link{TRUE}}, names attributes of result are set.} } \value{ Returns a \code{\link{logical}} \code{\link{vector}} of length N (K). diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/man/colAnyNAs.Rd r-bioc-delayedmatrixstats-1.24.0+ds/man/colAnyNAs.Rd --- r-bioc-delayedmatrixstats-1.22.6+ds/man/colAnyNAs.Rd 2023-06-09 18:04:41.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/man/colAnyNAs.Rd 2023-10-24 18:28:57.000000000 +0000 @@ -1,44 +1,17 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/AllGenerics.R, R/colAnyMissings.R, -% R/colAnyNAs.R, R/rowAnyMissings.R, R/rowAnyNAs.R -\name{colAnyMissings} -\alias{colAnyMissings} -\alias{rowAnyMissings} -\alias{colAnyMissings,DelayedMatrix-method} +% Please edit documentation in R/colAnyNAs.R, R/rowAnyNAs.R +\name{colAnyNAs,DelayedMatrix-method} \alias{colAnyNAs,DelayedMatrix-method} -\alias{rowAnyMissings,DelayedMatrix-method} \alias{rowAnyNAs,DelayedMatrix-method} -\title{Checks if there are any missing values in an object or not} +\title{Check if any elements in a row (column) of a matrix-like object is missing} \usage{ -colAnyMissings(x, rows = NULL, cols = NULL, ..., useNames = NA) - -rowAnyMissings(x, rows = NULL, cols = NULL, ..., useNames = NA) - -\S4method{colAnyMissings}{DelayedMatrix}( - x, - rows = NULL, - cols = NULL, - force_block_processing = FALSE, - ..., - useNames = NA -) - \S4method{colAnyNAs}{DelayedMatrix}( x, rows = NULL, cols = NULL, force_block_processing = FALSE, ..., - useNames = NA -) - -\S4method{rowAnyMissings}{DelayedMatrix}( - x, - rows = NULL, - cols = NULL, - force_block_processing = FALSE, - ..., - useNames = NA + useNames = TRUE ) \S4method{rowAnyNAs}{DelayedMatrix}( @@ -47,21 +20,15 @@ cols = NULL, force_block_processing = FALSE, ..., - useNames = NA + useNames = TRUE ) } \arguments{ \item{x}{A NxK \linkS4class{DelayedMatrix}.} -\item{rows}{A \code{\link[base]{vector}} indicating subset of rows to -operate over. If \code{\link[base]{NULL}}, no subsetting is done.} - -\item{cols}{A \code{\link[base]{vector}} indicating subset of columns to -operate over. If \code{\link[base]{NULL}}, no subsetting is done.} - -\item{...}{Additional arguments passed to specific methods.} - -\item{useNames}{If \code{\link{NA}}, the default behavior of the function about naming support is remained. If \code{\link{FALSE}}, no naming support is done. Else if \code{\link{TRUE}}, names attributes of result are set. \strong{Only \code{useNames = NA} is currently supported, other values are silently ignored.}} +\item{rows, cols}{A \code{\link{vector}} indicating the subset of rows +(and/or columns) to operate over. If \code{\link{NULL}}, no subsetting is +done.} \item{force_block_processing}{\code{FALSE} (the default) means that a seed-aware, optimised method is used (if available). This can be overridden @@ -69,21 +36,22 @@ (typically not advised). The block-processing strategy loads one or more (depending on \verb{\link[DelayedArray]\{getAutoBlockSize\}()}) columns (\code{colFoo()}) or rows (\code{rowFoo()}) into memory as an ordinary \link[base:array]{base::array}.} + +\item{...}{Additional arguments passed to specific methods.} + +\item{useNames}{If \code{\link{NA}}, the default behavior of the function about naming support is remained. If \code{\link{FALSE}}, no naming support is done. Else if \code{\link{TRUE}}, names attributes of result are set.} } \value{ -Returns \code{\link[base:logical]{TRUE}} if a missing value was -detected, otherwise \code{\link[base:logical]{FALSE}}. +Returns a \code{\link{logical}} \code{\link{vector}} of length N (K). } \description{ -Checks if there are any missing values in an object or not. -\emph{Please use \code{base::anyNA()} instead of \code{anyMissing()}, -\code{colAnyNAs()} instead of \code{colAnyMissings()}, and -\code{rowAnyNAs()} instead of \code{rowAnyMissings()}.} +Check if any elements in a row (column) of a matrix-like object is missing. } \details{ -The implementation of this method is optimized for both speed and memory. -The method will return \code{\link[base:logical]{TRUE}} as soon as a missing -value is detected. +The S4 methods for \code{x} of type \code{\link{matrix}}, +\code{\link{array}}, \code{\link{table}}, or \code{\link{numeric}} call +\code{matrixStats::\link[matrixStats]{rowAnyNAs}} / +\code{matrixStats::\link[matrixStats]{colAnyNAs}}. } \examples{ # A DelayedMatrix with a 'matrix' seed @@ -105,8 +73,14 @@ rowAnyNAs(dm_HDF5) } \seealso{ -Starting with R v3.1.0, there is \code{anyNA()} in the \pkg{base}, -which provides the same functionality as \code{anyMissing()}. +\itemize{ +\item \code{matrixStats::\link[matrixStats:anyMissing]{rowAnyNAs}()} and +\code{matrixStats::\link[matrixStats:anyMissing]{colAnyNAs}()} which are +used when the input is a \code{matrix} or \code{numeric} vector. +\item For checks if any element is equal to a value, see +\code{\link[MatrixGenerics]{rowAnys}()}. +\item \code{base::\link{is.na}()} and \code{base::\link{any}()}. +} } \author{ Peter Hickey diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/man/colCollapse.Rd r-bioc-delayedmatrixstats-1.24.0+ds/man/colCollapse.Rd --- r-bioc-delayedmatrixstats-1.22.6+ds/man/colCollapse.Rd 2023-06-09 18:04:41.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/man/colCollapse.Rd 2023-10-24 18:28:57.000000000 +0000 @@ -11,7 +11,7 @@ cols = NULL, force_block_processing = FALSE, ..., - useNames = NA + useNames = TRUE ) \S4method{rowCollapse}{DelayedMatrix}( @@ -20,7 +20,7 @@ rows = NULL, force_block_processing = FALSE, ..., - useNames = NA + useNames = TRUE ) } \arguments{ @@ -38,7 +38,7 @@ \item{...}{Additional arguments passed to specific methods.} -\item{useNames}{If \code{\link{NA}}, the default behavior of the function about naming support is remained. If \code{\link{FALSE}}, no naming support is done. Else if \code{\link{TRUE}}, names attributes of result are set. \strong{Only \code{useNames = NA} is currently supported, other values are silently ignored.}} +\item{useNames}{If \code{\link{NA}}, the default behavior of the function about naming support is remained. If \code{\link{FALSE}}, no naming support is done. Else if \code{\link{TRUE}}, names attributes of result are set.} \item{rows, cols}{A \code{\link{vector}} indicating the subset of rows (and/or columns) to operate over. If \code{\link{NULL}}, no subsetting is diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/man/colCounts.Rd r-bioc-delayedmatrixstats-1.24.0+ds/man/colCounts.Rd --- r-bioc-delayedmatrixstats-1.22.6+ds/man/colCounts.Rd 2023-06-09 18:04:41.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/man/colCounts.Rd 2023-10-24 18:28:57.000000000 +0000 @@ -14,7 +14,7 @@ na.rm = FALSE, force_block_processing = FALSE, ..., - useNames = NA + useNames = TRUE ) \S4method{rowCounts}{DelayedMatrix}( @@ -25,7 +25,7 @@ na.rm = FALSE, force_block_processing = FALSE, ..., - useNames = NA + useNames = TRUE ) } \arguments{ @@ -50,7 +50,7 @@ \item{...}{Additional arguments passed to specific methods.} -\item{useNames}{If \code{\link{NA}}, the default behavior of the function about naming support is remained. If \code{\link{FALSE}}, no naming support is done. Else if \code{\link{TRUE}}, names attributes of result are set. \strong{Only \code{useNames = NA} is currently supported, other values are silently ignored.}} +\item{useNames}{If \code{\link{NA}}, the default behavior of the function about naming support is remained. If \code{\link{FALSE}}, no naming support is done. Else if \code{\link{TRUE}}, names attributes of result are set.} } \value{ Returns a \code{\link{integer}} \code{\link{vector}} of length N (K). diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/man/colCummaxs.Rd r-bioc-delayedmatrixstats-1.24.0+ds/man/colCummaxs.Rd --- r-bioc-delayedmatrixstats-1.22.6+ds/man/colCummaxs.Rd 2023-06-09 18:04:41.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/man/colCummaxs.Rd 2023-10-24 18:28:57.000000000 +0000 @@ -20,7 +20,7 @@ cols = NULL, force_block_processing = FALSE, ..., - useNames = NA + useNames = TRUE ) \S4method{colCummins}{DelayedMatrix}( @@ -29,7 +29,7 @@ cols = NULL, force_block_processing = FALSE, ..., - useNames = NA + useNames = TRUE ) \S4method{colCumprods}{DelayedMatrix}( @@ -38,7 +38,7 @@ cols = NULL, force_block_processing = FALSE, ..., - useNames = NA + useNames = TRUE ) \S4method{colCumsums}{DelayedMatrix}( @@ -47,7 +47,7 @@ cols = NULL, force_block_processing = FALSE, ..., - useNames = NA + useNames = TRUE ) \S4method{rowCummaxs}{DelayedMatrix}( @@ -56,7 +56,7 @@ cols = NULL, force_block_processing = FALSE, ..., - useNames = NA + useNames = TRUE ) \S4method{rowCummins}{DelayedMatrix}( @@ -65,7 +65,7 @@ cols = NULL, force_block_processing = FALSE, ..., - useNames = NA + useNames = TRUE ) \S4method{rowCumprods}{DelayedMatrix}( @@ -74,7 +74,7 @@ cols = NULL, force_block_processing = FALSE, ..., - useNames = NA + useNames = TRUE ) \S4method{rowCumsums}{DelayedMatrix}( @@ -83,7 +83,7 @@ cols = NULL, force_block_processing = FALSE, ..., - useNames = NA + useNames = TRUE ) } \arguments{ @@ -102,7 +102,7 @@ \item{...}{Additional arguments passed to specific methods.} -\item{useNames}{If \code{\link{NA}}, the default behavior of the function about naming support is remained. If \code{\link{FALSE}}, no naming support is done. Else if \code{\link{TRUE}}, names attributes of result are set. \strong{Only \code{useNames = NA} is currently supported, other values are silently ignored.}} +\item{useNames}{If \code{\link{NA}}, the default behavior of the function about naming support is remained. If \code{\link{FALSE}}, no naming support is done. Else if \code{\link{TRUE}}, names attributes of result are set.} } \value{ Returns a \code{\link{numeric}} \code{\link{matrix}}with the same diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/man/colDiffs.Rd r-bioc-delayedmatrixstats-1.24.0+ds/man/colDiffs.Rd --- r-bioc-delayedmatrixstats-1.22.6+ds/man/colDiffs.Rd 2023-06-09 18:04:41.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/man/colDiffs.Rd 2023-10-24 18:28:57.000000000 +0000 @@ -14,7 +14,7 @@ differences = 1L, force_block_processing = FALSE, ..., - useNames = NA + useNames = TRUE ) \S4method{rowDiffs}{DelayedMatrix}( @@ -25,7 +25,7 @@ differences = 1L, force_block_processing = FALSE, ..., - useNames = NA + useNames = TRUE ) } \arguments{ @@ -48,7 +48,7 @@ \item{...}{Additional arguments passed to specific methods.} -\item{useNames}{If \code{\link{NA}}, the default behavior of the function about naming support is remained. If \code{\link{FALSE}}, no naming support is done. Else if \code{\link{TRUE}}, names attributes of result are set. \strong{Only \code{useNames = NA} is currently supported, other values are silently ignored.}} +\item{useNames}{If \code{\link{NA}}, the default behavior of the function about naming support is remained. If \code{\link{FALSE}}, no naming support is done. Else if \code{\link{TRUE}}, names attributes of result are set.} } \value{ Returns a \code{\link{numeric}} \code{\link{matrix}} with one column diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/man/colIQRDiffs.Rd r-bioc-delayedmatrixstats-1.24.0+ds/man/colIQRDiffs.Rd --- r-bioc-delayedmatrixstats-1.22.6+ds/man/colIQRDiffs.Rd 2023-06-09 18:04:41.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/man/colIQRDiffs.Rd 2023-10-24 18:28:57.000000000 +0000 @@ -23,7 +23,7 @@ trim = 0, force_block_processing = FALSE, ..., - useNames = NA + useNames = TRUE ) \S4method{colMadDiffs}{DelayedMatrix}( @@ -35,7 +35,7 @@ trim = 0, force_block_processing = FALSE, ..., - useNames = NA + useNames = TRUE ) \S4method{colSdDiffs}{DelayedMatrix}( @@ -47,7 +47,7 @@ trim = 0, force_block_processing = FALSE, ..., - useNames = NA + useNames = TRUE ) \S4method{colVarDiffs}{DelayedMatrix}( @@ -59,7 +59,7 @@ trim = 0, force_block_processing = FALSE, ..., - useNames = NA + useNames = TRUE ) \S4method{rowIQRDiffs}{DelayedMatrix}( @@ -71,7 +71,7 @@ trim = 0, force_block_processing = FALSE, ..., - useNames = NA + useNames = TRUE ) \S4method{rowMadDiffs}{DelayedMatrix}( @@ -83,7 +83,7 @@ trim = 0, force_block_processing = FALSE, ..., - useNames = NA + useNames = TRUE ) \S4method{rowSdDiffs}{DelayedMatrix}( @@ -95,7 +95,7 @@ trim = 0, force_block_processing = FALSE, ..., - useNames = NA + useNames = TRUE ) \S4method{rowVarDiffs}{DelayedMatrix}( @@ -107,7 +107,7 @@ trim = 0, force_block_processing = FALSE, ..., - useNames = NA + useNames = TRUE ) } \arguments{ @@ -135,7 +135,7 @@ \item{...}{Additional arguments passed to specific methods.} -\item{useNames}{If \code{\link{NA}}, the default behavior of the function about naming support is remained. If \code{\link{FALSE}}, no naming support is done. Else if \code{\link{TRUE}}, names attributes of result are set. \strong{Only \code{useNames = NA} is currently supported, other values are silently ignored.}} +\item{useNames}{If \code{\link{NA}}, the default behavior of the function about naming support is remained. If \code{\link{FALSE}}, no naming support is done. Else if \code{\link{TRUE}}, names attributes of result are set.} } \value{ Returns a \code{\link{numeric}} \code{\link{vector}} of length N (K). diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/man/colIQRs.Rd r-bioc-delayedmatrixstats-1.24.0+ds/man/colIQRs.Rd --- r-bioc-delayedmatrixstats-1.22.6+ds/man/colIQRs.Rd 2023-06-09 18:04:41.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/man/colIQRs.Rd 2023-10-24 18:28:57.000000000 +0000 @@ -13,7 +13,7 @@ na.rm = FALSE, force_block_processing = FALSE, ..., - useNames = NA + useNames = TRUE ) \S4method{rowIQRs}{DelayedMatrix}( @@ -23,7 +23,7 @@ na.rm = FALSE, force_block_processing = FALSE, ..., - useNames = NA + useNames = TRUE ) } \arguments{ @@ -46,7 +46,7 @@ \item{...}{Additional arguments passed to specific methods.} -\item{useNames}{If \code{\link{NA}}, the default behavior of the function about naming support is remained. If \code{\link{FALSE}}, no naming support is done. Else if \code{\link{TRUE}}, names attributes of result are set. \strong{Only \code{useNames = NA} is currently supported, other values are silently ignored.}} +\item{useNames}{If \code{\link{NA}}, the default behavior of the function about naming support is remained. If \code{\link{FALSE}}, no naming support is done. Else if \code{\link{TRUE}}, names attributes of result are set.} } \value{ Returns a \code{\link{numeric}} \code{\link{vector}} of length N (K). diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/man/colLogSumExps.Rd r-bioc-delayedmatrixstats-1.24.0+ds/man/colLogSumExps.Rd --- r-bioc-delayedmatrixstats-1.22.6+ds/man/colLogSumExps.Rd 2023-06-09 18:04:41.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/man/colLogSumExps.Rd 2023-10-24 18:28:57.000000000 +0000 @@ -13,7 +13,7 @@ na.rm = FALSE, force_block_processing = FALSE, ..., - useNames = NA + useNames = TRUE ) \S4method{rowLogSumExps}{DelayedMatrix}( @@ -23,7 +23,7 @@ na.rm = FALSE, force_block_processing = FALSE, ..., - useNames = NA + useNames = TRUE ) } \arguments{ @@ -45,7 +45,7 @@ \item{...}{Additional arguments passed to specific methods.} -\item{useNames}{If \code{\link{NA}}, the default behavior of the function about naming support is remained. If \code{\link{FALSE}}, no naming support is done. Else if \code{\link{TRUE}}, names attributes of result are set. \strong{Only \code{useNames = NA} is currently supported, other values are silently ignored.}} +\item{useNames}{If \code{\link{NA}}, the default behavior of the function about naming support is remained. If \code{\link{FALSE}}, no naming support is done. Else if \code{\link{TRUE}}, names attributes of result are set.} } \value{ Returns a \code{\link{numeric}} \code{\link{vector}} of length N (K). diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/man/colMads.Rd r-bioc-delayedmatrixstats-1.24.0+ds/man/colMads.Rd --- r-bioc-delayedmatrixstats-1.22.6+ds/man/colMads.Rd 2023-06-09 18:04:41.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/man/colMads.Rd 2023-10-24 18:28:57.000000000 +0000 @@ -17,7 +17,7 @@ na.rm = FALSE, force_block_processing = FALSE, ..., - useNames = NA + useNames = TRUE ) \S4method{colSds}{DelayedMatrix}( @@ -28,7 +28,7 @@ center = NULL, force_block_processing = FALSE, ..., - useNames = NA + useNames = TRUE ) \S4method{rowMads}{DelayedMatrix}( @@ -40,7 +40,7 @@ na.rm = FALSE, force_block_processing = FALSE, ..., - useNames = NA + useNames = TRUE ) \S4method{rowSds}{DelayedMatrix}( @@ -51,7 +51,7 @@ center = NULL, force_block_processing = FALSE, ..., - useNames = NA + useNames = TRUE ) } \arguments{ @@ -79,7 +79,7 @@ \item{...}{Additional arguments passed to specific methods.} -\item{useNames}{If \code{\link{NA}}, the default behavior of the function about naming support is remained. If \code{\link{FALSE}}, no naming support is done. Else if \code{\link{TRUE}}, names attributes of result are set. \strong{Only \code{useNames = NA} is currently supported, other values are silently ignored.}} +\item{useNames}{If \code{\link{NA}}, the default behavior of the function about naming support is remained. If \code{\link{FALSE}}, no naming support is done. Else if \code{\link{TRUE}}, names attributes of result are set.} } \value{ Returns a \code{\link{numeric}} \code{\link{vector}} of length N (K). diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/man/colMeans2.Rd r-bioc-delayedmatrixstats-1.24.0+ds/man/colMeans2.Rd --- r-bioc-delayedmatrixstats-1.22.6+ds/man/colMeans2.Rd 2023-06-09 18:04:41.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/man/colMeans2.Rd 2023-10-24 18:28:57.000000000 +0000 @@ -15,12 +15,12 @@ na.rm = FALSE, force_block_processing = FALSE, ..., - useNames = NA + useNames = TRUE ) -\S4method{colMeans2}{Matrix}(x, rows = NULL, cols = NULL, na.rm = FALSE, ..., useNames = NA) +\S4method{colMeans2}{Matrix}(x, rows = NULL, cols = NULL, na.rm = FALSE, ..., useNames = TRUE) -\S4method{colMeans2}{SolidRleArraySeed}(x, rows = NULL, cols = NULL, na.rm = FALSE, ..., useNames = NA) +\S4method{colMeans2}{SolidRleArraySeed}(x, rows = NULL, cols = NULL, na.rm = FALSE, ..., useNames = TRUE) \S4method{rowMeans2}{DelayedMatrix}( x, @@ -29,10 +29,10 @@ na.rm = FALSE, force_block_processing = FALSE, ..., - useNames = NA + useNames = TRUE ) -\S4method{rowMeans2}{Matrix}(x, rows = NULL, cols = NULL, na.rm = FALSE, ..., useNames = NA) +\S4method{rowMeans2}{Matrix}(x, rows = NULL, cols = NULL, na.rm = FALSE, ..., useNames = TRUE) } \arguments{ \item{x}{A NxK \linkS4class{DelayedMatrix}.} @@ -54,7 +54,7 @@ \item{...}{Additional arguments passed to specific methods.} -\item{useNames}{If \code{\link{NA}}, the default behavior of the function about naming support is remained. If \code{\link{FALSE}}, no naming support is done. Else if \code{\link{TRUE}}, names attributes of result are set. \strong{Only \code{useNames = NA} is currently supported, other values are silently ignored.}} +\item{useNames}{If \code{\link{NA}}, the default behavior of the function about naming support is remained. If \code{\link{FALSE}}, no naming support is done. Else if \code{\link{TRUE}}, names attributes of result are set.} } \value{ Returns a \code{\link{numeric}} \code{\link{vector}} of length N (K). diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/man/colMedians.Rd r-bioc-delayedmatrixstats-1.24.0+ds/man/colMedians.Rd --- r-bioc-delayedmatrixstats-1.22.6+ds/man/colMedians.Rd 2023-06-09 18:04:41.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/man/colMedians.Rd 2023-10-24 18:28:57.000000000 +0000 @@ -12,7 +12,7 @@ na.rm = FALSE, force_block_processing = FALSE, ..., - useNames = NA + useNames = TRUE ) \S4method{rowMedians}{DelayedMatrix}( @@ -22,7 +22,7 @@ na.rm = FALSE, force_block_processing = FALSE, ..., - useNames = NA + useNames = TRUE ) } \arguments{ @@ -45,7 +45,7 @@ \item{...}{Additional arguments passed to specific methods.} -\item{useNames}{If \code{\link{NA}}, the default behavior of the function about naming support is remained. If \code{\link{FALSE}}, no naming support is done. Else if \code{\link{TRUE}}, names attributes of result are set. \strong{Only \code{useNames = NA} is currently supported, other values are silently ignored.}} +\item{useNames}{If \code{\link{NA}}, the default behavior of the function about naming support is remained. If \code{\link{FALSE}}, no naming support is done. Else if \code{\link{TRUE}}, names attributes of result are set.} } \value{ Returns a \code{\link{numeric}} \code{\link{vector}} of length N (K). diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/man/colOrderStats.Rd r-bioc-delayedmatrixstats-1.24.0+ds/man/colOrderStats.Rd --- r-bioc-delayedmatrixstats-1.22.6+ds/man/colOrderStats.Rd 2023-06-09 18:04:41.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/man/colOrderStats.Rd 2023-10-24 18:28:57.000000000 +0000 @@ -12,7 +12,7 @@ which, force_block_processing = FALSE, ..., - useNames = NA + useNames = TRUE ) \S4method{rowOrderStats}{DelayedMatrix}( @@ -22,7 +22,7 @@ which, force_block_processing = FALSE, ..., - useNames = NA + useNames = TRUE ) } \arguments{ @@ -44,7 +44,7 @@ \item{...}{Additional arguments passed to specific methods.} -\item{useNames}{If \code{\link{NA}}, the default behavior of the function about naming support is remained. If \code{\link{FALSE}}, no naming support is done. Else if \code{\link{TRUE}}, names attributes of result are set. \strong{Only \code{useNames = NA} is currently supported, other values are silently ignored.}} +\item{useNames}{If \code{\link{NA}}, the default behavior of the function about naming support is remained. If \code{\link{FALSE}}, no naming support is done. Else if \code{\link{TRUE}}, names attributes of result are set.} } \value{ Returns a \code{\link{numeric}} \code{\link{vector}} of length N (K). diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/man/colProds.Rd r-bioc-delayedmatrixstats-1.24.0+ds/man/colProds.Rd --- r-bioc-delayedmatrixstats-1.22.6+ds/man/colProds.Rd 2023-06-09 18:04:41.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/man/colProds.Rd 2023-10-24 18:28:57.000000000 +0000 @@ -14,7 +14,7 @@ method = c("direct", "expSumLog"), force_block_processing = FALSE, ..., - useNames = NA + useNames = TRUE ) \S4method{colProds}{SolidRleArraySeed}( @@ -24,7 +24,7 @@ na.rm = FALSE, method = c("direct", "expSumLog"), ..., - useNames = NA + useNames = TRUE ) \S4method{rowProds}{DelayedMatrix}( @@ -35,7 +35,7 @@ method = c("direct", "expSumLog"), force_block_processing = FALSE, ..., - useNames = NA + useNames = TRUE ) } \arguments{ @@ -62,7 +62,7 @@ \item{...}{Additional arguments passed to specific methods.} -\item{useNames}{If \code{\link{NA}}, the default behavior of the function about naming support is remained. If \code{\link{FALSE}}, no naming support is done. Else if \code{\link{TRUE}}, names attributes of result are set. \strong{Only \code{useNames = NA} is currently supported, other values are silently ignored.}} +\item{useNames}{If \code{\link{NA}}, the default behavior of the function about naming support is remained. If \code{\link{FALSE}}, no naming support is done. Else if \code{\link{TRUE}}, names attributes of result are set.} } \value{ Returns a \code{\link{numeric}} \code{\link{vector}} of length N (K). diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/man/colQuantiles.Rd r-bioc-delayedmatrixstats-1.24.0+ds/man/colQuantiles.Rd --- r-bioc-delayedmatrixstats-1.22.6+ds/man/colQuantiles.Rd 2023-06-09 18:04:41.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/man/colQuantiles.Rd 2023-10-24 18:28:57.000000000 +0000 @@ -14,7 +14,7 @@ type = 7L, force_block_processing = FALSE, ..., - useNames = NA, + useNames = TRUE, drop = TRUE ) @@ -27,7 +27,7 @@ type = 7L, force_block_processing = FALSE, ..., - useNames = NA, + useNames = TRUE, drop = TRUE ) } @@ -56,7 +56,7 @@ \item{...}{Additional arguments passed to specific methods.} -\item{useNames}{If \code{\link{NA}}, the default behavior of the function about naming support is remained. If \code{\link{FALSE}}, no naming support is done. Else if \code{\link{TRUE}}, names attributes of result are set. \strong{Only \code{useNames = NA} is currently supported, other values are silently ignored.}} +\item{useNames}{If \code{\link{NA}}, the default behavior of the function about naming support is remained. If \code{\link{FALSE}}, no naming support is done. Else if \code{\link{TRUE}}, names attributes of result are set.} \item{drop}{If \code{TRUE} a vector is returned if \code{J == 1}.} } diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/man/colRanks.Rd r-bioc-delayedmatrixstats-1.24.0+ds/man/colRanks.Rd --- r-bioc-delayedmatrixstats-1.22.6+ds/man/colRanks.Rd 2023-06-09 18:04:41.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/man/colRanks.Rd 2023-10-24 18:28:57.000000000 +0000 @@ -14,7 +14,7 @@ preserveShape = FALSE, force_block_processing = FALSE, ..., - useNames = useNames + useNames = TRUE ) \S4method{rowRanks}{DelayedMatrix}( @@ -24,7 +24,7 @@ ties.method = c("max", "average", "first", "last", "random", "max", "min", "dense"), force_block_processing = FALSE, ..., - useNames = NA + useNames = TRUE ) } \arguments{ @@ -51,7 +51,7 @@ \item{...}{Additional arguments passed to specific methods.} -\item{useNames}{If \code{\link{NA}}, the default behavior of the function about naming support is remained. If \code{\link{FALSE}}, no naming support is done. Else if \code{\link{TRUE}}, names attributes of result are set. \strong{Only \code{useNames = NA} is currently supported, other values are silently ignored.}} +\item{useNames}{If \code{\link{NA}}, the default behavior of the function about naming support is remained. If \code{\link{FALSE}}, no naming support is done. Else if \code{\link{TRUE}}, names attributes of result are set.} } \value{ a matrix of type \code{\link{integer}} is returned unless diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/man/colSums2.Rd r-bioc-delayedmatrixstats-1.24.0+ds/man/colSums2.Rd --- r-bioc-delayedmatrixstats-1.22.6+ds/man/colSums2.Rd 2023-06-09 18:04:41.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/man/colSums2.Rd 2023-10-24 18:28:57.000000000 +0000 @@ -15,12 +15,12 @@ na.rm = FALSE, force_block_processing = FALSE, ..., - useNames = NA + useNames = TRUE ) -\S4method{colSums2}{Matrix}(x, rows = NULL, cols = NULL, na.rm = FALSE, ..., useNames = NA) +\S4method{colSums2}{Matrix}(x, rows = NULL, cols = NULL, na.rm = FALSE, ..., useNames = TRUE) -\S4method{colSums2}{SolidRleArraySeed}(x, rows = NULL, cols = NULL, na.rm = FALSE, ..., useNames = NA) +\S4method{colSums2}{SolidRleArraySeed}(x, rows = NULL, cols = NULL, na.rm = FALSE, ..., useNames = TRUE) \S4method{rowSums2}{DelayedMatrix}( x, @@ -29,10 +29,10 @@ na.rm = FALSE, force_block_processing = FALSE, ..., - useNames = NA + useNames = TRUE ) -\S4method{rowSums2}{Matrix}(x, rows = NULL, cols = NULL, na.rm = FALSE, ..., useNames = useNames) +\S4method{rowSums2}{Matrix}(x, rows = NULL, cols = NULL, na.rm = FALSE, ..., useNames = TRUE) } \arguments{ \item{x}{A NxK \linkS4class{DelayedMatrix}.} @@ -54,7 +54,7 @@ \item{...}{Additional arguments passed to specific methods.} -\item{useNames}{If \code{\link{NA}}, the default behavior of the function about naming support is remained. If \code{\link{FALSE}}, no naming support is done. Else if \code{\link{TRUE}}, names attributes of result are set. \strong{Only \code{useNames = NA} is currently supported, other values are silently ignored.}} +\item{useNames}{If \code{\link{NA}}, the default behavior of the function about naming support is remained. If \code{\link{FALSE}}, no naming support is done. Else if \code{\link{TRUE}}, names attributes of result are set.} } \value{ Returns a \code{\link{numeric}} \code{\link{vector}} of length N (K). diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/man/colTabulates.Rd r-bioc-delayedmatrixstats-1.24.0+ds/man/colTabulates.Rd --- r-bioc-delayedmatrixstats-1.22.6+ds/man/colTabulates.Rd 2023-06-09 18:04:41.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/man/colTabulates.Rd 2023-10-24 18:28:57.000000000 +0000 @@ -12,7 +12,7 @@ values = NULL, force_block_processing = FALSE, ..., - useNames = NA + useNames = TRUE ) \S4method{rowTabulates}{DelayedMatrix}( @@ -22,7 +22,7 @@ values = NULL, force_block_processing = FALSE, ..., - useNames = NA + useNames = TRUE ) } \arguments{ @@ -43,7 +43,7 @@ \item{...}{Additional arguments passed to specific methods.} -\item{useNames}{If \code{\link{NA}}, the default behavior of the function about naming support is remained. If \code{\link{FALSE}}, no naming support is done. Else if \code{\link{TRUE}}, names attributes of result are set. \strong{Only \code{useNames = NA} is currently supported, other values are silently ignored.}} +\item{useNames}{If \code{\link{NA}}, the default behavior of the function about naming support is remained. If \code{\link{FALSE}}, no naming support is done. Else if \code{\link{TRUE}}, names attributes of result are set.} } \value{ a \code{\link{numeric}} \code{NxJ} (\code{KxJ}) diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/man/colVars.Rd r-bioc-delayedmatrixstats-1.24.0+ds/man/colVars.Rd --- r-bioc-delayedmatrixstats-1.22.6+ds/man/colVars.Rd 2023-06-09 18:04:41.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/man/colVars.Rd 2023-10-24 18:28:57.000000000 +0000 @@ -13,7 +13,7 @@ center = NULL, force_block_processing = FALSE, ..., - useNames = NA + useNames = TRUE ) \S4method{rowVars}{DelayedMatrix}( @@ -24,7 +24,7 @@ center = NULL, force_block_processing = FALSE, ..., - useNames = NA + useNames = TRUE ) } \arguments{ @@ -49,7 +49,7 @@ \item{...}{Additional arguments passed to specific methods.} -\item{useNames}{If \code{\link{NA}}, the default behavior of the function about naming support is remained. If \code{\link{FALSE}}, no naming support is done. Else if \code{\link{TRUE}}, names attributes of result are set. \strong{Only \code{useNames = NA} is currently supported, other values are silently ignored.}} +\item{useNames}{If \code{\link{NA}}, the default behavior of the function about naming support is remained. If \code{\link{FALSE}}, no naming support is done. Else if \code{\link{TRUE}}, names attributes of result are set.} } \value{ Returns a \code{\link{numeric}} \code{\link{vector}} of length N (K). diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/man/colWeightedMads.Rd r-bioc-delayedmatrixstats-1.24.0+ds/man/colWeightedMads.Rd --- r-bioc-delayedmatrixstats-1.22.6+ds/man/colWeightedMads.Rd 2023-06-09 18:04:41.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/man/colWeightedMads.Rd 2023-10-24 18:28:57.000000000 +0000 @@ -16,7 +16,7 @@ center = NULL, force_block_processing = FALSE, ..., - useNames = NA + useNames = TRUE ) \S4method{rowWeightedMads}{DelayedMatrix}( @@ -29,7 +29,7 @@ center = NULL, force_block_processing = FALSE, ..., - useNames = NA + useNames = TRUE ) } \arguments{ @@ -60,7 +60,7 @@ \item{...}{Additional arguments passed to specific methods.} -\item{useNames}{If \code{\link{NA}}, the default behavior of the function about naming support is remained. If \code{\link{FALSE}}, no naming support is done. Else if \code{\link{TRUE}}, names attributes of result are set. \strong{Only \code{useNames = NA} is currently supported, other values are silently ignored.}} +\item{useNames}{If \code{\link{NA}}, the default behavior of the function about naming support is remained. If \code{\link{FALSE}}, no naming support is done. Else if \code{\link{TRUE}}, names attributes of result are set.} } \value{ Returns a \code{\link{numeric}} \code{\link{vector}} of length N (K). diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/man/colWeightedMeans.Rd r-bioc-delayedmatrixstats-1.24.0+ds/man/colWeightedMeans.Rd --- r-bioc-delayedmatrixstats-1.22.6+ds/man/colWeightedMeans.Rd 2023-06-09 18:04:41.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/man/colWeightedMeans.Rd 2023-10-24 18:28:57.000000000 +0000 @@ -13,7 +13,7 @@ na.rm = FALSE, force_block_processing = FALSE, ..., - useNames = NA + useNames = TRUE ) \S4method{rowWeightedMeans}{DelayedMatrix}( @@ -24,7 +24,7 @@ na.rm = FALSE, force_block_processing = FALSE, ..., - useNames = NA + useNames = TRUE ) } \arguments{ @@ -50,7 +50,7 @@ \item{...}{Additional arguments passed to specific methods.} -\item{useNames}{If \code{\link{NA}}, the default behavior of the function about naming support is remained. If \code{\link{FALSE}}, no naming support is done. Else if \code{\link{TRUE}}, names attributes of result are set. \strong{Only \code{useNames = NA} is currently supported, other values are silently ignored.}} +\item{useNames}{If \code{\link{NA}}, the default behavior of the function about naming support is remained. If \code{\link{FALSE}}, no naming support is done. Else if \code{\link{TRUE}}, names attributes of result are set.} } \value{ Returns a \code{\link{numeric}} \code{\link{vector}} of length N (K). diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/man/colWeightedMedians.Rd r-bioc-delayedmatrixstats-1.24.0+ds/man/colWeightedMedians.Rd --- r-bioc-delayedmatrixstats-1.22.6+ds/man/colWeightedMedians.Rd 2023-06-09 18:04:41.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/man/colWeightedMedians.Rd 2023-10-24 18:28:57.000000000 +0000 @@ -13,7 +13,7 @@ na.rm = FALSE, force_block_processing = FALSE, ..., - useNames = NA + useNames = TRUE ) \S4method{rowWeightedMedians}{DelayedMatrix}( @@ -24,7 +24,7 @@ na.rm = FALSE, force_block_processing = FALSE, ..., - useNames = NA + useNames = TRUE ) } \arguments{ @@ -50,7 +50,7 @@ \item{...}{Additional arguments passed to specific methods.} -\item{useNames}{If \code{\link{NA}}, the default behavior of the function about naming support is remained. If \code{\link{FALSE}}, no naming support is done. Else if \code{\link{TRUE}}, names attributes of result are set. \strong{Only \code{useNames = NA} is currently supported, other values are silently ignored.}} +\item{useNames}{If \code{\link{NA}}, the default behavior of the function about naming support is remained. If \code{\link{FALSE}}, no naming support is done. Else if \code{\link{TRUE}}, names attributes of result are set.} } \value{ Returns a \code{\link{numeric}} \code{\link{vector}} of length N (K). diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/man/colWeightedVars.Rd r-bioc-delayedmatrixstats-1.24.0+ds/man/colWeightedVars.Rd --- r-bioc-delayedmatrixstats-1.22.6+ds/man/colWeightedVars.Rd 2023-06-09 18:04:41.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/man/colWeightedVars.Rd 2023-10-24 18:28:57.000000000 +0000 @@ -17,7 +17,7 @@ na.rm = FALSE, force_block_processing = FALSE, ..., - useNames = NA + useNames = TRUE ) \S4method{colWeightedVars}{DelayedMatrix}( @@ -28,7 +28,7 @@ na.rm = FALSE, force_block_processing = FALSE, ..., - useNames = NA + useNames = TRUE ) \S4method{rowWeightedSds}{DelayedMatrix}( @@ -39,7 +39,7 @@ na.rm = FALSE, force_block_processing = FALSE, ..., - useNames = NA + useNames = TRUE ) \S4method{rowWeightedVars}{DelayedMatrix}( @@ -50,7 +50,7 @@ na.rm = FALSE, force_block_processing = FALSE, ..., - useNames = NA + useNames = TRUE ) } \arguments{ @@ -76,7 +76,7 @@ \item{...}{Additional arguments passed to specific methods.} -\item{useNames}{If \code{\link{NA}}, the default behavior of the function about naming support is remained. If \code{\link{FALSE}}, no naming support is done. Else if \code{\link{TRUE}}, names attributes of result are set. \strong{Only \code{useNames = NA} is currently supported, other values are silently ignored.}} +\item{useNames}{If \code{\link{NA}}, the default behavior of the function about naming support is remained. If \code{\link{FALSE}}, no naming support is done. Else if \code{\link{TRUE}}, names attributes of result are set.} } \value{ Returns a \code{\link{numeric}} \code{\link{vector}} of length N (K). diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/man-roxygen/common_params.R r-bioc-delayedmatrixstats-1.24.0+ds/man-roxygen/common_params.R --- r-bioc-delayedmatrixstats-1.22.6+ds/man-roxygen/common_params.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/man-roxygen/common_params.R 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ -# #' @param BACKEND "auto" (the default) selects a sensible realization backend -# #' based on `class(x)`. See [DelayedArray::supportedRealizationBackends()] for -# #' the list of supported backends. -#' @param force_block_processing `FALSE` (the default) means that a -#' seed-aware, optimised method is used (if available). This can be overridden -#' to use the general block-processing strategy by setting this to `TRUE` -#' (typically not advised). The block-processing strategy loads one or more -#' (depending on `\link[DelayedArray]{getAutoBlockSize}()`) columns (`colFoo()`) -#' or rows (`rowFoo()`) into memory as an ordinary [base::array]. -#' @param ... Additional arguments passed to specific methods. diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/man-roxygen/example_dm_HDF5.R r-bioc-delayedmatrixstats-1.24.0+ds/man-roxygen/example_dm_HDF5.R --- r-bioc-delayedmatrixstats-1.22.6+ds/man-roxygen/example_dm_HDF5.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/man-roxygen/example_dm_HDF5.R 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ -#' @examples -#' # A DelayedMatrix with a 'HDF5ArraySeed' seed -#' # NOTE: Requires that the HDF5Array package is installed -#' library(HDF5Array) -#' dm_HDF5 <- writeHDF5Array(matrix(c(rep(1L, 5), -#' as.integer((0:4) ^ 2), -#' seq(-5L, -1L, 1L)), -#' ncol = 3)) diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/man-roxygen/example_dm_MatrixMatrix.R r-bioc-delayedmatrixstats-1.24.0+ds/man-roxygen/example_dm_MatrixMatrix.R --- r-bioc-delayedmatrixstats-1.22.6+ds/man-roxygen/example_dm_MatrixMatrix.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/man-roxygen/example_dm_MatrixMatrix.R 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ -#' @examples -#' # A DelayedMatrix with a 'Matrix' seed -#' dm_Matrix <- DelayedArray(Matrix::Matrix(c(rep(1L, 5), -#' as.integer((0:4) ^ 2), -#' seq(-5L, -1L, 1L)), -#' ncol = 3)) diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/man-roxygen/example_dm_Rle.R r-bioc-delayedmatrixstats-1.24.0+ds/man-roxygen/example_dm_Rle.R --- r-bioc-delayedmatrixstats-1.22.6+ds/man-roxygen/example_dm_Rle.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/man-roxygen/example_dm_Rle.R 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ -#' @examples -#' # A DelayedMatrix with a 'SolidRleArraySeed' seed -#' dm_Rle <- RleArray(Rle(c(rep(1L, 5), -#' as.integer((0:4) ^ 2), -#' seq(-5L, -1L, 1L))), -#' dim = c(5, 3)) diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/man-roxygen/example_dm_S4VectorsDF.R r-bioc-delayedmatrixstats-1.24.0+ds/man-roxygen/example_dm_S4VectorsDF.R --- r-bioc-delayedmatrixstats-1.22.6+ds/man-roxygen/example_dm_S4VectorsDF.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/man-roxygen/example_dm_S4VectorsDF.R 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -#' @examples -#' # A DelayedMatrix with a 'DataFrame' seed -#' dm_DF <- DelayedArray(S4Vectors::DataFrame(C1 = rep(1L, 5), -#' C2 = as.integer((0:4) ^ 2), -#' C3 = seq(-5L, -1L, 1L))) diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/man-roxygen/example_dm_df.R r-bioc-delayedmatrixstats-1.24.0+ds/man-roxygen/example_dm_df.R --- r-bioc-delayedmatrixstats-1.22.6+ds/man-roxygen/example_dm_df.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/man-roxygen/example_dm_df.R 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -#' @examples -#' # A DelayedMatrix with a 'data.frame' seed -#' dm_df <- DelayedArray(data.frame(C1 = rep(1L, 5), -#' C2 = as.integer((0:4) ^ 2), -#' C3 = seq(-5L, -1L, 1L))) diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/man-roxygen/example_dm_matrix.R r-bioc-delayedmatrixstats-1.24.0+ds/man-roxygen/example_dm_matrix.R --- r-bioc-delayedmatrixstats-1.22.6+ds/man-roxygen/example_dm_matrix.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/man-roxygen/example_dm_matrix.R 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ -#' @examples -#' # A DelayedMatrix with a 'matrix' seed -#' dm_matrix <- DelayedArray(matrix(c(rep(1L, 5), -#' as.integer((0:4) ^ 2), -#' seq(-5L, -1L, 1L)), -#' ncol = 3)) diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/man-roxygen/lowercase_x.R r-bioc-delayedmatrixstats-1.24.0+ds/man-roxygen/lowercase_x.R --- r-bioc-delayedmatrixstats-1.22.6+ds/man-roxygen/lowercase_x.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/man-roxygen/lowercase_x.R 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -#' @param x A NxK [DelayedMatrix-class]. diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/man-roxygen/lx.R r-bioc-delayedmatrixstats-1.24.0+ds/man-roxygen/lx.R --- r-bioc-delayedmatrixstats-1.22.6+ds/man-roxygen/lx.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/man-roxygen/lx.R 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -#' @param lx A NxK \linkS4class{DelayedMatrix}. Typically, `lx` are \eqn{log(x)} values. diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/man-roxygen/uppercase_X.R r-bioc-delayedmatrixstats-1.24.0+ds/man-roxygen/uppercase_X.R --- r-bioc-delayedmatrixstats-1.22.6+ds/man-roxygen/uppercase_X.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/man-roxygen/uppercase_X.R 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -#' @param X A NxM [DelayedMatrix-class]. diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/man-roxygen/useNamesParameter.R r-bioc-delayedmatrixstats-1.24.0+ds/man-roxygen/useNamesParameter.R --- r-bioc-delayedmatrixstats-1.22.6+ds/man-roxygen/useNamesParameter.R 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/man-roxygen/useNamesParameter.R 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -#' @param useNames If \code{\link{NA}}, the default behavior of the function about naming support is remained. If \code{\link{FALSE}}, no naming support is done. Else if \code{\link{TRUE}}, names attributes of result are set. \strong{Only \code{useNames = NA} is currently supported, other values are silently ignored.} diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/tests/testthat/test_row_and_col_functions.R r-bioc-delayedmatrixstats-1.24.0+ds/tests/testthat/test_row_and_col_functions.R --- r-bioc-delayedmatrixstats-1.22.6+ds/tests/testthat/test_row_and_col_functions.R 2023-08-10 18:05:57.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/tests/testthat/test_row_and_col_functions.R 2023-10-24 18:28:57.000000000 +0000 @@ -45,7 +45,7 @@ test_that("Default arguments", { check.attributes <- checkAttributes(DelayedMatrix_list) expecteds <- Map(mg_f, matrix_list) - observeds <- Map(dms_f, DelayedMatrix_list) + observeds <- Map(dmg_f, DelayedMatrix_list) Map(expect_equal, observeds, expecteds, check.attributes = check.attributes) }) } @@ -65,7 +65,7 @@ rows = rows_list, cols = cols_list) observeds <- Map( - f = dms_f, + f = dmg_f, DelayedMatrix_list, rows = rows_list, cols = cols_list) @@ -80,13 +80,13 @@ DelayedMatrix_list <- DelayedMatrix_list[ grep("base_case", names(DelayedMatrix_list))] check.attributes <- checkAttributes(DelayedMatrix_list) - if (any(grepl("col", body(dms_f)))) { + if (any(grepl("col", body(dmg_f)))) { group_list <- list(c(1, 2, 2, 2)) } else { group_list <- list(c(1, 1, 2)) } expecteds <- Map(mg_f, matrix_list, group = group_list) - observeds <- Map(dms_f, DelayedMatrix_list, group = group_list) + observeds <- Map(dmg_f, DelayedMatrix_list, group = group_list) Map(expect_equal_DA, observeds, expecteds, check.attributes = check.attributes) }) @@ -100,20 +100,9 @@ # Get the function to be tested f <- test_manifest[i, "Function"] - - # This hack is to preserve the `useNames = FALSE` behaviour of - # colAnyMissings/rowAnyMissings in BioC <= BioC 3.17 and matrixStats < 1.0.0 - # in BioC == 3.17 with matrixStats == 1.0.0. - # colAnyMissings/rowAnyMissings are effectively aliases for - # colAnyNAs/rowAnyNAs and will be deprecated in the next release. - if (f == "colAnyMissings") { - f <- "colAnyNAs" - } else if (f == "rowAnyMissings") { - f <- "rowAnyNAs" - } # A clunky hack to get MatrixGenerics::f mg_f <- get(f, envir = environment(MatrixGenerics::colSums2)) - dms_f <- get(f) + dmg_f <- get(f) context(f) # Filter out those storage modes not to be tested @@ -130,21 +119,6 @@ test_integer = test_integer, test_double = test_double, test_logical = test_logical) - # NOTE: Strip dimnames if testing colMaxs/rowMaxs or colMins/rowMins. The - # DelayedArary-methods for these functions are defined in DelayedArray - # rather than DelayedMatrixStats and these have always propagated the - # names. So this is a workaround for a temporary discordance between - # matrixStats::f() and MatrixGenerics::f() [which resolves to - # DelayedArray::f()] for these functions and how they treat names. - # This hack is only applicable for BioC 3.17 because starting with BioC - # 3.18 the naming behaviour of these DelayedArray::f() is consistent - # with matrixStats and MatrixGenerics. - # See https://github.com/Bioconductor/DelayedArray/issues/107 for - # further details and discussion. - if (f %in% c("colMaxs", "colMins", "rowMaxs", "rowMins")) { - filtered_matrix_list <- lapply(filtered_matrix_list, unname) - filtered_DelayedMatrix_list <- lapply(filtered_DelayedMatrix_list, unname) - } # Run selected tests if (test_manifest[i, "testDefaultArgs"]) { diff -Nru r-bioc-delayedmatrixstats-1.22.6+ds/vignettes/DelayedMatrixStatsOverview.Rmd r-bioc-delayedmatrixstats-1.24.0+ds/vignettes/DelayedMatrixStatsOverview.Rmd --- r-bioc-delayedmatrixstats-1.22.6+ds/vignettes/DelayedMatrixStatsOverview.Rmd 2023-04-25 18:26:38.000000000 +0000 +++ r-bioc-delayedmatrixstats-1.24.0+ds/vignettes/DelayedMatrixStatsOverview.Rmd 2023-10-24 18:28:57.000000000 +0000 @@ -333,3 +333,9 @@ `r Biocpkg("DelayedMatrixStats")`, package developers will be able to focus on higher level programming tasks and address important scientific questions and technological challenges in high-throughput biology. + +# Session info + +```{r} +sessionInfo() +``` \ No newline at end of file