% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/as_interactive.R
\name{as_interactive}
\alias{as_interactive}
\title{As interactive}
\source{
\href{https://github.com/yihui/knitr/issues/926}{
GitHub Issue to check whether knitting}
}
\usage{
as_interactive(
  plt,
  to_widget = isTRUE(getOption("knitr.in.progress")),
  add_boxmode = FALSE
)
}
\arguments{
\item{plt}{ggplot object.}

\item{to_widget}{Convert to a widget so it works within Rmarkdown HTML files.
By default, this will be only be set to \code{TRUE} when being run within 
the context of \pkg{knitr} rendering.}

\item{add_boxmode}{Add extra \link[plotly]{layout} to enable dodged boxplots.}
}
\value{
A \link[plotly]{plotly} object or a \link[htmltools]{tagList} 
wrapping the \link[plotly]{plotly} object.
}
\description{
Convert a \link[ggplot2]{ggplot} object to \link[plotly]{plotly}, 
and enable it to be plotted within an Rmarkdown HTML file.
}
\keyword{internal}
