summarise.incidence2 | R Documentation |
Method for dplyr::summarise that implicitly accounts for the inherent grouping structure of incidence2 objects.
## S3 method for class 'incidence2'
summarise(.data, ..., .by, .groups)
.data |
An incidence2 object. |
... |
< The value can be:
|
.by |
Not used as grouping structure implicit. |
.groups |
Not used. |
A tibble.
dplyr::summarise for the underlying grouping.
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") |>
summarise(model = list(glm(count ~ date_index, family = "poisson")))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.