create_api: Create API based on Vega-Lite schema

Description Usage Arguments Value Examples

View source: R/api.R

Description

Will auto-generate function definitions & documentation based on provided schema.

Usage

1

Arguments

schema

A JSON schema read into R as a list, e.g using [jsonlite::read_json()]

Value

A character vector with function definitions

Examples

1
2
3
4
5
6
schema_file <- Sys.glob(
    file.path(system.file("schema/vega-lite", package = "vegawidget"),
             "*.json")
 )
VL_SCHEMA <- jsonlite::read_json(schema_file)
api <- create_api(VL_SCHEMA)

AliciaSchep/vlmetabuildr documentation built on Jan. 8, 2020, 7:30 a.m.