Skip to contents

Add data in the format of an R data frame

Usage

vl_add_data_frame(spec, values, ...)

Arguments

spec

An input vega-lite spec

values

Data frame with data to add to chart

...

Additional arguments to pass to vl_add_data(), such as name or format

Value

A modified Vega-Lite Spec

See also

Examples


vl_chart() %>%
  vl_add_data_frame(mtcars) %>%
  vl_mark_point() %>%
  vl_encode_x("wt") %>%
  vl_encode_y("mpg")