Description Usage Arguments Value Examples
Aggregate a data.table to a specified frequency and return wide format data
1 2 3 4 5 6 7 8 | agg_to_freq_wide(
dt,
date_name = "ref_date",
frq = c("month", "week", "quarter", "year"),
id_name = "series_name",
value_name = "value",
dt_is_wide = FALSE
)
|
dt |
data.table in long format |
date_name |
name of date column |
frq |
frequency for aggregation, one of '"month"', '"week"', '"quarter"', or '"year"' |
id_name |
name of id column |
value_name |
name of value column |
dt_is_wide |
T/F, is input data 'dt' in wide format |
Aggregated data at specificed frequency in wide format
1 | out <- agg_to_freq_wide(fred,frq="quarter")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.