If you have V8 installed, you can use this function to compile a Vega-Lite specification into a Vega specification.

vw_to_vega(spec)

Arguments

spec

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

Value

S3 object of class vegaspec_vega and vegaspec

Examples

  vw_spec_version(spec_mtcars)
#> $library
#> [1] "vega_lite"
#> 
#> $version
#> [1] "5"
#> 
  vw_spec_version(vw_to_vega(spec_mtcars))
#> $library
#> [1] "vega"
#> 
#> $version
#> [1] "5"
#>