rowCumSum: Apply cumsum in each row

Description Usage Arguments Value Author(s) Examples

View source: R/RcppExports.R

Description

Fast computation of t(apply(x,1,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)
rowCumSum(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    6
[2,]    2    8
[3,]    3   10
[4,]    4   12

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