vegawidget (version 0.3.2)

vw_spec_version: Determine vegaspec version

Description

Use this function to determine the library and version of a vegaspec.

Usage

vw_spec_version(spec)

Arguments

spec

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

Value

list with elements library, version

Details

Returns a list with two elements:

library

character, either "vega" or "vega_lite"

version

character, version tag

Examples

Run this code
# NOT RUN {
  vw_spec_version(spec_mtcars)
# }
# NOT RUN {
  # requires nodejs to be installed
  vw_spec_version(vw_to_vega(spec_mtcars))
# }

Run the code above in your browser using DataLab