| colAvgsPerRowSet {DelayedMatrixStats} | R Documentation |
Applies a row-by-row (column-by-column) averaging function to equally-sized subsets of matrix columns (rows). Each subset is averaged independently of the others.
colAvgsPerRowSet(X, W = NULL, cols = NULL, S, FUN = colMeans, ..., tFUN = FALSE) rowAvgsPerColSet(X, W = NULL, rows = NULL, S, FUN = rowMeans, ..., tFUN = FALSE) ## S4 method for signature 'DelayedMatrix' colAvgsPerRowSet(X, W = NULL, cols = NULL, S, FUN = colMeans, ..., force_block_processing = FALSE, tFUN = FALSE) ## S4 method for signature 'DelayedMatrix' rowAvgsPerColSet(X, W = NULL, rows = NULL, S, FUN = rowMeans, ..., force_block_processing = FALSE, tFUN = FALSE)
X |
A NxM DelayedMatrix. |
W |
|
cols |
A |
S |
An |
FUN |
The row-by-row (column-by-column) |
... |
Additional arguments passed to specific methods. |
tFUN |
If |
rows |
A |
force_block_processing |
|
If argument S is a single column vector with indices 1:N, then
rowAvgsPerColSet(X, S = S, FUN = rowMeans) gives the same result as
rowMeans(X). Analogously, for rowAvgsPerColSet().
Returns a numeric JxN (MxJ)
matrix, where row names equal rownames(X)
(colnames(S)) and column names colnames(S)
(colnames(X)).
# 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)))
colAvgsPerRowSet(dm_DF, S = matrix(1:2, ncol = 2))
rowAvgsPerColSet(dm_DF, S = matrix(1:2, ncol = 1))