agg_vec {fabletools} | R Documentation |
Create an aggregation vector
Description
Usage
agg_vec(x = character(), aggregated = logical(vec_size(x)))
Arguments
x |
The vector of values. |
aggregated |
A logical vector to identify which values are |
Details
An aggregation vector extends usual vectors by adding <aggregated>
values.
These vectors are typically produced via the aggregate_key()
function,
however it can be useful to create them manually to produce more complicated
hierarchies (such as unbalanced hierarchies).
Examples
agg_vec(
x = c(NA, "A", "B"),
aggregated = c(TRUE, FALSE, FALSE)
)
[Package fabletools version 0.4.2 Index]