regroup | R Documentation |
This function regroups an incidence2 object across the specified groups. The resulting incidence2 object will contains counts aggregated over the specified groups.
regroup(x, groups = NULL)
x |
|
groups |
The groups to sum over. If |
regroup_()
for a version supporting
if (requireNamespace("outbreaks", quietly = TRUE)) {
data(ebola_sim_clean, package = "outbreaks")
dat <- ebola_sim_clean$linelist
i <- incidence(
dat,
date_index = "date_of_onset",
groups = c("gender", "hospital")
)
regroup(i)
regroup(i, "hospital")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.