Skip to contents

Add LookupTransform to a vega-lite spec.

Usage

vl_lookup(
  spec,
  lookup = NULL,
  from = NULL,
  as = NULL,
  default = NULL,
  .object = NULL
)

Arguments

spec

An input vega-lite spec

lookup

Key in primary data source.

from

Data source or selection for secondary data reference.

as

The output fields on which to store the looked up data values.

For data lookups, this property may be left blank if from.fields has been specified (those field names will be used); if from.fields has not been specified, as must be a string.

For selection lookups, this property is optional: if unspecified, looked up values will be stored under a property named for the selection; and if specified, it must correspond to from.fields.

default

The default value to use if lookup fails.

Default value: null

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

Value

A modified Vega-Lite Spec