Description Usage Arguments Value Examples
Aggregate a data.table in long format to a specified frequency
1 2 3 4 5 6 7 | agg_to_freq(
dt_long,
frq = c("month", "week", "quarter", "year"),
date_name = "ref_date",
id_name = "series_name",
value_name = "value"
)
|
dt_long |
data.table in long format |
frq |
frequency for aggregation, one of '"month"', '"week"', '"quarter"', or '"year"' |
date_name |
name of date column |
id_name |
name of id column |
value_name |
name of value column |
Aggregated data at specified frequency in long format
1 | out <- agg_to_freq(fred[series_name == "gdp constant prices"], frq = "year")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.