rowMeans2 {matrixStats} | R Documentation |
Calculates the mean for each row (column) in a matrix.
rowMeans2(x, rows = NULL, cols = NULL, na.rm = FALSE, dim. = dim(x), ...) colMeans2(x, rows = NULL, cols = NULL, na.rm = FALSE, dim. = dim(x), ...)
x |
|
rows, cols |
A |
na.rm |
|
dim. |
An |
... |
Not used. |
The implementation of rowMeans2()
and colMeans2()
is
optimized for both speed and memory.
Returns a numeric
vector
of
length N (K).
Henrik Bengtsson