Skip to contents

Add FlattenTransform to a vega-lite spec.

Usage

vl_flatten(spec, flatten = NULL, as = NULL, .object = NULL)

Arguments

spec

An input vega-lite spec

flatten

An array of one or more data fields containing arrays to flatten. If multiple fields are specified, their array values should have a parallel structure, ideally with the same length. If the lengths of parallel arrays do not match, the longest array will be used with null values added for missing entries.

as

The output field names for extracted array values.

Default value: The field name of the corresponding array field

.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: FlattenTransform

Value

A modified Vega-Lite Spec