colCumSum: Apply cumsum in each column

Description Usage Arguments Value Author(s) Examples

View source: R/RcppExports.R

Description

Fast computation of apply(x,2,cumsum)

Usage

1

Arguments

x

A matrix.

Value

A matrix of same size as x.

Author(s)

Thomas Alexander Gerds <tag@biostat.ku.dk>

Examples

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

Example output

Loading required package: data.table
Loading required package: ggplot2
Loading required package: prodlim
riskRegression version 2019.01.29
     [,1] [,2]
[1,]    1    5
[2,]    3   11
[3,]    6   18
[4,]   10   26

riskRegression documentation built on Jan. 13, 2021, 11:12 a.m.