Description Usage Arguments Details Value Note Author(s) See Also Examples
Form row and column sums and means for sparse arrays (currently
simple_triplet_matrix
only).
1 2 3 4 5 6 7 8 9 10 11 12 13 | row_sums(x, na.rm = FALSE, dims = 1, ...)
col_sums(x, na.rm = FALSE, dims = 1, ...)
row_means(x, na.rm = FALSE, dims = 1, ...)
col_means(x, na.rm = FALSE, dims = 1, ...)
## S3 method for class 'simple_triplet_matrix'
row_sums(x, na.rm = FALSE, dims = 1, ...)
## S3 method for class 'simple_triplet_matrix'
col_sums(x, na.rm = FALSE, dims = 1, ...)
## S3 method for class 'simple_triplet_matrix'
row_means(x, na.rm = FALSE, dims = 1, ...)
## S3 method for class 'simple_triplet_matrix'
col_means(x, na.rm = FALSE, dims = 1, ...)
|
x |
a sparse array containing numeric, integer, or logical values. |
na.rm |
logical. Should missing values (including |
dims |
currently not used for sparse arrays. |
... |
currently not used for sparse arrays. |
Provides fast summation over the rows or columns of sparse matrices in
simple_triplet
-form.
A numeric (double) array of suitable size, or a vector if the result
is one-dimensional. The dimnames
(or names
for a vector
result) are taken from the original array.
Results are always of storage type double
to avoid (integer)
overflows.
Christian Buchta
simple_triplet_matrix
, colSums
for dense
numeric arrays.
1 2 3 4 5 6 7 8 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.