Description Usage Arguments Details Value Examples
Validate the Vega-Lite widget against the schema
1 | validate_vl(vl, verbose = TRUE)
|
vl |
Vega-Lite object |
verbose |
|
Use of this function requires jsonvalidate package to be installed.
TRUE
if valid, FALSE
if not
1 2 3 4 5 6 7 8 9 10 11 12 13 | dat <- jsonlite::fromJSON('[
{"a": "A","b": 28}, {"a": "B","b": 55}, {"a": "C","b": 43},
{"a": "D","b": 91}, {"a": "E","b": 81}, {"a": "F","b": 53},
{"a": "G","b": 19}, {"a": "H","b": 87}, {"a": "I","b": 52}
]')
vl <- vegalite() %>%
add_data(dat) %>%
encode_x("a", "ordinal") %>%
encode_y("b", "quantitative") %>%
mark_bar()
validate_vl(vl)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.