Calculates the sum for each row (column) in a matrix.
rowSums2(x, rows = NULL, cols = NULL, na.rm = FALSE, dim. = dim(x),
..., useNames = NA)colSums2(x, rows = NULL, cols = NULL, na.rm = FALSE, dim. = dim(x),
..., useNames = NA)
If TRUE
, missing values are
excluded.
Not used.
The implementation of rowSums2()
and colSums2()
is
optimized for both speed and memory.