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