rowsum,DelayedMatrix-method {DelayedMatrixStats} | R Documentation |
Compute column and row sums across rows or columns of a numeric DelayedArray::DelayedMatrix object for each level of a grouping variable using block-processing.
## S4 method for signature 'DelayedMatrix' rowsum(x, group, reorder = TRUE, na.rm = FALSE, force_block_processing = FALSE, ...)
x |
An DelayedArray::DelayedMatrix object. |
group |
A vector or factor giving the grouping, with one element per
row of |
reorder |
If |
na.rm |
logical ( |
force_block_processing |
|
... |
Additional arguments passed to specific methods. |
# 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)) rowsum(dm_Matrix, group = c(1, 1, 1, 2, 2))