Skip to contents

Add QuantileTransform to a vega-lite spec.

Usage

vl_quantile(
  spec,
  quantile = NULL,
  as = NULL,
  groupby = NULL,
  probs = NULL,
  step = NULL,
  .object = NULL
)

Arguments

spec

An input vega-lite spec

quantile

The data field for which to perform quantile estimation.

as

The output field names for the probability and quantile values.

Default value: ["prob", "value"]

groupby

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

probs

An array of probabilities in the range (0, 1) for which to compute quantile values. If not specified, the step parameter will be used.

step

A probability step size (default 0.01) for sampling quantile values. All values from one-half the step size up to 1 (exclusive) will be sampled. This parameter is only used if the probs parameter is not provided.

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

Value

A modified Vega-Lite Spec