covidcast_signal
data frame, grouped by
geo_value
R/slide.R
slide_by_geo.Rd
Slides a given function over the values in a covidcast_signal
data frame,
grouped by geo_value
. (When multiple issue dates are present, only the
latest issue is considered.) See the getting started guide
for examples.
slide_by_geo( x, slide_fun, n = 14, col_name = "slide_value", col_type = c("dbl", "int", "lgl", "chr", "list"), ... )
x | The |
---|---|
slide_fun | Function or formula to slide over the values in |
n | Size of the local window (in days) to use. For example, if |
col_name | String indicating the name of the new column that will
contain the derivative values. Default is "slide_value"; note that setting
|
col_type | One of "dbl", "int", "lgl", "chr", or "list", indicating the data type (as tibble abbreviation) for the new column. Default is "dbl". |
... | Additional arguments to pass to the function or formula specified
via |
A data frame given by appending a new column to x
named according
to the col_name
argument, containing the function values.