cumulate

0th

Percentile

Compute cumulative 'incidence'

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

Usage
cumulate(x)

# S3 method for default cumulate(x)

# S3 method for incidence cumulate(x)

Arguments
x

An incidence object.

Details

  • default method is a wrapper for cumsum

  • incidence objects: computes cumulative incidence over time

  • projections objects: same, for projections objects, implemented in the similarly named package; see ?cumulate.projections for more information, after loading the package

See Also

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

Aliases
  • cumulate
  • cumulate.default
  • cumulate.incidence
Examples
# NOT RUN {
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)

# }
Documentation reproduced from package incidence, version 1.7.0, License: MIT + file LICENSE

Community examples

Looks like there are no examples yet.