View source: R/data-converters.R
enw_add_cumulative | R Documentation |
Calculate cumulative reported cases from incidence of new reports
enw_add_cumulative(obs, by = NULL, copy = TRUE)
obs |
A |
by |
A character vector describing the stratification of observations. This defaults to no grouping. This should be used when modelling multiple time series in order to identify them for downstream modelling |
copy |
Should |
The input data.frame
with a new variable confirm
.
Data converters
enw_add_incidence()
,
enw_aggregate_cumulative()
,
enw_cumulative_to_incidence()
,
enw_incidence_to_cumulative()
,
enw_incidence_to_linelist()
,
enw_linelist_to_incidence()
# Default reconstruct incidence
dt <- germany_covid19_hosp[location == "DE"][age_group == "00+"]
dt <- enw_add_incidence(dt)
dt <- dt[, confirm := NULL]
enw_add_cumulative(dt)
# Make use of maximum reported to calculate empirical daily reporting
enw_add_cumulative(dt)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.