Use these functions to get which versions of Vega JavaScript libraries are available. vega_version_all() returns a data frame showing all versions included in this package, vega_version_available() returns all versions available - subject to locking, vega_version() shows the default version.

vega_version(major = FALSE)

vega_version_all(major = FALSE)

vega_version_available(major = FALSE)

Arguments

major

logical return major version-tags rather than the tags for the specific versions supported by this package

Value

vega_version()

list with elements: is_locked, widget, vega_lite, vega, vega_embed.

vega_version_all()

data.frame with elements: widget, vega_lite, vega, vega_embed.

vega_version_available()

data.frame with elements: widget, vega_lite, vega, vega_embed.

Details

This package offers multiple widgets, each corresponding to a major version of Vega-Lite. Only one of these widgets can be used for a given loading of this package. When vegawidget() is first called, the widget is "locked" according to the $schema in the vegaspec used, or the default - the most-recent version.

is_locked

indicates if vegawidget() is has locked the version.

widget

indicates which version of the widget would be used.

Examples

  vega_version()
#> $widget
#> [1] "vl5"
#> 
#> $vega_lite
#> [1] "5.16.3"
#> 
#> $vega
#> [1] "5.24.0"
#> 
#> $vega_embed
#> [1] "6.22.2"
#> 
#> $is_locked
#> [1] TRUE
#> 
  vega_version(major = TRUE)
#> $widget
#> [1] "vl5"
#> 
#> $vega_lite
#> [1] "5"
#> 
#> $vega
#> [1] "5"
#> 
#> $vega_embed
#> [1] "6"
#> 
#> $is_locked
#> [1] TRUE
#> 
  vega_version_all()
#>   widget vega_lite   vega vega_embed
#> 1    vl5    5.16.3 5.24.0     6.22.2
#> 2    vl4    4.17.0 5.17.0     6.12.2
  vega_version_available()
#>   widget vega_lite   vega vega_embed
#> 1    vl5    5.16.3 5.24.0     6.22.2