# NOT RUN {
spec <- list(
`$schema` = vega_schema(),
data = list(values = mtcars),
mark = "point",
encoding = list(
x = list(field = "wt", type = "quantitative"),
y = list(field = "mpg", type = "quantitative"),
color = list(field = "cyl", type = "nominal")
)
)
as_vegaspec(spec)
# }
# NOT RUN {
# requires network-access
as_vegaspec("https://vega.github.io/vega-lite/examples/specs/bar.vl.json")
# }
Run the code above in your browser using DataLab