colCumSum: Apply cumsum to each column of matrix

View source: R/RcppExports.R

colCumSumR Documentation

Apply cumsum to each column of matrix

Description

Fast computation of apply(m, 2, cumsum)

Usage

colCumSum(m)

Arguments

m

A matrix

Value

A matrix the same size as m with the column-wise cumulative sums.

Author(s)

Claus Ekstrom <claus@rprimer.dk>

Examples

  # Generate a 100 by 10000 matrix
  x <- matrix(rnorm(100*10000), nrow=100)
  result <- colCumSum(x)


MESS documentation built on Aug. 21, 2023, 1:05 a.m.

Related to colCumSum in MESS...