Skip to contents

Normalizes passed table objects (data.frame, tibble, table, gt, flextable, htmlwidgets) and creates an interactive 2D infinite canvas htmlwidget suitable for rendering in R Markdown, Quarto, Shiny, or exporting via save_sideview().

Usage

sideview_widget(
  ...,
  width = NULL,
  height = NULL,
  elementId = NULL,
  options = list(),
  theme = "auto",
  state = NULL
)

Arguments

...

Arbitrary table objects (data.frame, tibble, table, gt, flextable, htmlwidgets), named or unnamed, or a single list of tables.

width

Optional widget width (e.g. "100%").

height

Optional widget height (e.g. "600px").

elementId

Optional HTML element identifier.

options

Named list of canvas options (e.g. snapToEdge, snapThreshold, minScale, maxScale).

theme

Canvas theme: "auto" (default; follows the reader's prefers-color-scheme), "light", "dark", an sv_theme() or a bslib::bs_theme().

state

A saved workspace to restore (see sideview()): a sideview_state or the path to a saved state file.

Value

An S3 object of class c("sideview", "htmlwidget").

Examples

if (interactive()) {
  sideview_widget(mtcars, iris)
}