aggregate_rolling_sum: Internal function to perform rolling sum aggregation

aggregate_rolling_sumR Documentation

Internal function to perform rolling sum aggregation

Description

This function takes a data.table and applies a rolling sum over a given timestep, aggregating by specified columns. It's particularly useful for aggregating observations over certain periods.

Usage

aggregate_rolling_sum(dt, internal_timestep, by = NULL)

Arguments

dt

A data.table to be aggregated.

internal_timestep

An integer indicating the period over which to aggregate.

by

A character vector specifying the columns to aggregate by.

Value

A modified data.table with aggregated observations.

See Also

Utility functions coerce_date(), coerce_dt(), date_to_numeric_modulus(), get_internal_timestep(), is.Date(), stan_fns_as_string()


seabbs/epinowcast documentation built on July 17, 2024, 5:18 p.m.