vegawidget (version 0.3.2)

vega_schema: Create string for schema-URL

Description

Useful if you are creating a vegaspec manually.

Usage

vega_schema(library = c("vega_lite", "vega"), major = TRUE)

Arguments

library

character, either "vega" or "vega_lite"

major

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

Value

character URL for schema

Examples

Run this code
# NOT RUN {
  vega_schema()
  vega_schema("vega", major = FALSE)

  # creating a spec by hand
  spec <-
    list(
      `$schema` = vega_schema(),
      width = 300,
      height = 300
      # and so on
    ) %>%
    as_vegaspec()

# }

Run the code above in your browser using DataLab