as_interactive: As interactive

View source: R/as_interactive.R

as_interactiveR Documentation

As interactive

Description

Convert a ggplot object to plotly, and enable it to be plotted within an Rmarkdown HTML file.

Usage

as_interactive(
  plt,
  to_widget = isTRUE(getOption("knitr.in.progress")),
  add_boxmode = FALSE
)

Arguments

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 TRUE when being run within the context of knitr rendering.

add_boxmode

Add extra layout to enable dodged boxplots.

Value

A plotly object or a tagList wrapping the plotly object.

Source

GitHub Issue to check whether knitting


neurogenomics/EpiCompare documentation built on Oct. 18, 2024, 11:04 p.m.