cumulate | R Documentation |
cumulate()
computes the cumulative incidence over time for an
incidence2 object.
cumulate(x)
x |
incidence2 object. |
dat <- data.frame(
dates = as.integer(c(0,1,2,2,3,5,7)),
groups = factor(c(1, 2, 3, 3, 3, 3, 1))
)
i <- incidence(dat, date_index = "dates", groups = "groups")
cumulate(i)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.