find_peak | R Documentation |
This function can be used to find the peak of an epidemic curve stored as an
[incidence2]
object.
find_peak(x, complete_dates = TRUE, ...)
x |
incidence2 object. |
complete_dates |
Should Defaults to TRUE. |
... |
Other arguments passed to |
An [incidence2]
object the date of the (first) highest incidence in the
data along with the count. If x
is grouped object then the output will have
the peak calculated for each grouping.
estimate_peak()
for bootstrap estimates of the peak time.
if (requireNamespace("outbreaks", quietly = TRUE)) {
# load data and create incidence
data(fluH7N9_china_2013, package = "outbreaks")
i <- incidence(fluH7N9_china_2013, date_index = "date_of_onset")
find_peak(i)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.