cumulate: Compute cumulative 'incidence'

Description Usage Arguments Details Author(s) See Also Examples

View source: R/cumulate.R

Description

cumulate is an S3 generic to compute cumulative numbers, with methods for different types of objects:

Usage

1
2
3
4
5
6
7
cumulate(x)

## Default S3 method:
cumulate(x)

## S3 method for class 'incidence'
cumulate(x)

Arguments

x

An incidence object.

Details

Author(s)

Thibaut Jombart thibautjombart@gmail.com

See Also

The incidence() function to generate the 'incidence' objects.

Examples

1
2
3
4
5
6
7
8
9
dat <- as.integer(c(0,1,2,2,3,5,7))
group <- factor(c(1, 2, 3, 3, 3, 3, 1))
i <- incidence(dat, groups = group)
i
plot(i)

i_cum <- cumulate(i)
i_cum
plot(i_cum)

incidence documentation built on Nov. 8, 2020, 4:30 p.m.