rowSums2 | R Documentation |
Calculates the sum for each row (column) in a matrix.
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)
x |
An NxK |
rows |
A |
cols |
A |
na.rm |
If |
dim. |
An |
... |
Not used. |
useNames |
If |
The implementation of rowSums2()
and colSums2()
is
optimized for both speed and memory.
Returns a numeric
vector
of
length N (K).
Henrik Bengtsson
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.