Aggregates a data frame containing a covariate of interest in space and/or time.
aggregate_cov(
data = NULL,
var = NULL,
time = NULL,
area = NULL,
aggregate_space = NULL,
aggregate_time = NULL,
aggregate_space_fun = "mean",
aggregate_time_fun = "mean"
)A data frame with the aggregated covariate.
Data frame containing equally spaced (daily, weekly, monthly) incident cases for one or multiple areas.
Name of the variable that identifies the covariate.
Name of the variable that identifies the temporal dimension. The values must be in date format ("yyyy-mm-dd") representing the date of observation for daily data, the first day of the week for weekly, or the first day of the month for monthly observations.
Name of variable that identifies the different locations (i.e., areal units) for which a time series is available.
Name of variable used to define spatial aggregation groups.
Temporal scale used to perform temporal aggregation. Options are: "week" (ISO 8601), "month", "year".
Character indicating the function to be used in the aggregation over space, default is "mean".
Character indicating the function to be used in the aggregation over time, default is "mean".