vw_as_json {vegawidget}R Documentation

Coerce vegaspec to JSON

Description

For Vega and Vega-Lite, the translation between lists and JSON is a little bit particular. This function, vw_as_json(), can be used to translate to JSON; as_vegaspec() can be used to translate from JSON.

Usage

vw_as_json(spec, pretty = TRUE)

Arguments

spec

An object to be coerced to vegaspec, a Vega/Vega-Lite specification

pretty

logical indicates to use pretty (vs. minified) formatting

Value

jsonlite::json object

See Also

as_vegaspec()

Examples

  vw_as_json(spec_mtcars)


[Package vegawidget version 0.5.0 Index]