Skip to contents

Add CalculateTransform to a vega-lite spec.

Usage

vl_calculate(spec, calculate = NULL, as = NULL, .object = NULL)

Arguments

spec

An input vega-lite spec

calculate

A expression string. Use the variable datum to refer to the current data object.

as

The field for storing the computed formula value.

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

Value

A modified Vega-Lite Spec