Skip to contents

An aggregation vector is a special type of node_vec() consisting of a single parent (the 'aggregated' value) and its children. Aggregated values are identified by a logical vector passed to the aggregated argument, and disaggregated values are provided in x. Aggregated values are displayed as <aggregated> by default.

Usage

agg_vec(x = character(), aggregated = logical(NROW(x)))

Arguments

x

The vector of values.

aggregated

A logical vector to identify which values are <aggregated>.

Value

An agg_vec object.

Examples

agg_vec(
  x = c(NA, "A", "B"),
  aggregated = c(TRUE, FALSE, FALSE)
)
#> <agg_vec[3]>
#> [1] <aggregated> A            B