apply_zero_threshold | R Documentation |
NA
(missing) if the 7-day average is above a
threshold.This function aims to detect spurious zeroes by comparing the 7-day average
of the case counts to a threshold. If the 7-day average is above the
threshold, the zero case count is replaced with NA
.
apply_zero_threshold(data, threshold = Inf, obs_column = "confirm")
data |
A |
threshold |
Numeric, defaults to |
obs_column |
Character (default: "confirm"). If given, only the column specified here will be used for checking missingness. This is useful if using a data set that has multiple columns of hwich one of them corresponds to observations that are to be processed here. |
A data.table with the zero threshold applied.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.