colCumSum | R Documentation |
Fast computation of apply(m, 2, cumsum)
colCumSum(m)
m |
A matrix |
A matrix the same size as m with the column-wise cumulative sums.
Claus Ekstrom <claus@rprimer.dk>
# Generate a 100 by 10000 matrix
x <- matrix(rnorm(100*10000), nrow=100)
result <- colCumSum(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.