summarise.incidence2 {incidence2} | R Documentation |
Summarise each grouping down to one row
Description
Method for dplyr::summarise that implicitly accounts for the inherent grouping structure of incidence2 objects.
Usage
## S3 method for class 'incidence2'
summarise(.data, ..., .by, .groups)
Arguments
.data |
An incidence2 object. |
... |
< The value can be:
|
.by |
Not used as grouping structure implicit. |
.groups |
Not used. |
Value
A tibble.
See Also
dplyr::summarise for the underlying grouping.
Examples
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")))
}
[Package incidence2 version 2.3.1 Index]