as_chart | R Documentation |
Create Altair chart from vegaspec
as_chart(spec)
spec |
An object to be coerced to |
altair object
if (interactive()) {
as_chart(vegawidget::spec_mtcars)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.