Description Usage Arguments Value Examples
Equivalent to computing the cumulative sum of a matrix over rows, then over columns, then suming every value (though much faster and more memory efficient).
1 | sum_rowcolCumsum(x, i, j)
|
x |
Numeric vector of non-zero values of matrix. |
i |
Integer vector of row indices of x. |
j |
Integer vector of column indices of x. |
Numeric value equal to the sum of the cumulative sum computed over rows then columns of a matrix.
1 2 3 4 5 | x <- c(1, 1, 1, -1) # non-zero values of matrix
i <- c(1, 2, 3, 4) # row indices of x
j <- c(4, 1, 3, 2) # col indices of x
sum_rowcolCumsum(x, i, j)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.