Learn R Programming

plotly (version 3.4.13)

as.widget: Convert a plotly object to an htmlwidget object

Description

Convert a plotly object to an htmlwidget object

Usage

as.widget(x, ...)

Arguments

x

a plotly object.

...

other options passed onto htmlwidgets::createWidget

Examples

Run this code
# NOT RUN {
p <- plot_ly(mtcars, x = mpg, y = disp, mode = "markers")
htmlwidgets::saveWidget(as.widget(p), "index.html")
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab