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