Learn R Programming

riskRegression (version 1.3.7)

colCumSum: Apply cumsum in each column

Description

Fast computation of apply(x,2,cumsum)

Usage

colCumSum(x)

Arguments

x

A matrix.

Value

A matrix of same size as x.

Examples

Run this code
x <- matrix(1:8,ncol=2)
colCumSum(x)

Run the code above in your browser using DataLab