View source: R/as_interactive.R
as_interactive | R Documentation |
Convert a ggplot object to plotly, and enable it to be plotted within an Rmarkdown HTML file.
as_interactive(
plt,
to_widget = isTRUE(getOption("knitr.in.progress")),
add_boxmode = FALSE
)
plt |
ggplot object. |
to_widget |
Convert to a widget so it works within Rmarkdown HTML files.
By default, this will be only be set to |
add_boxmode |
Add extra layout to enable dodged boxplots. |
A plotly object or a tagList wrapping the plotly object.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.