split.incidence2 | R Documentation |
Split divides and incidence2 object in to it's underlying groupings (count variable and optionally groups).
## S3 method for class 'incidence2'
split(x, f, drop, ...)
x |
An incidence2 object. |
f |
Not used. Present only for generic compatibility. |
drop |
Not used. Present only for generic compatibility. |
... |
Not used. Present only for generic compatibility. |
A list of tibbles contained the split data. This list also has a "key" attribute which is a tibble with rows corresponding to the grouping of each split.
vctrs::vec_split()
on which split.incidence2()
is built.
if (requireNamespace("outbreaks", quietly = TRUE)) {
data(ebola_sim_clean, package = "outbreaks")
ebola_sim_clean$linelist |>
subset(!is.na(hospital)) |>
incidence_(date_of_onset, hospital, interval = "isoweek") |>
split()
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.