altair (version 4.2.3)

as_chart: Create Altair chart from vegaspec

Description

Create Altair chart from vegaspec

Usage

as_chart(spec)

Value

altair object

Arguments

spec

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

Examples

Run this code
  if (interactive()) {
    as_chart(vegawidget::spec_mtcars)
  }

Run the code above in your browser using DataLab