Skip to contents

Add AggregateTransform to a vega-lite spec.

Usage

vl_aggregate(spec, aggregate = NULL, groupby = NULL, .object = NULL)

Arguments

spec

An input vega-lite spec

aggregate

Array of objects that define fields to aggregate.

groupby

The data fields to group by. If not specified, a single group containing all data objects will be used.

.object

Directly input an object, rather than creating one via the other arguments. Should not be used in conjunction with the other arguments other than spec. Objects can be of type: AggregateTransform

Value

A modified Vega-Lite Spec