Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

saveWidget

Save a widget to an HTML file


Description

Save a rendered widget to an HTML file (e.g. for sharing with others).

Usage

saveWidget(
  widget,
  file,
  selfcontained = TRUE,
  libdir = NULL,
  background = "white",
  title = class(widget)[[1]],
  knitrOptions = list()
)

Arguments

widget

Widget to save

file

File to save HTML into

selfcontained

Whether to save the HTML as a single self-contained file (with external resources base64 encoded) or a file with external resources placed in an adjacent directory.

libdir

Directory to copy HTML dependencies into (defaults to filename_files).

background

Text string giving the html background color of the widget. Defaults to white.

title

Text to use as the title of the generated page.

knitrOptions

A list of knitr chunk options.


htmlwidgets

HTML Widgets for R

v1.5.3
MIT + file LICENSE
Authors
Ramnath Vaidyanathan [aut, cph], Yihui Xie [aut], JJ Allaire [aut], Joe Cheng [aut], Carson Sievert [aut, cre] (<https://orcid.org/0000-0002-4958-2844>), Kenton Russell [aut, cph], Ellis Hughes [ctb], RStudio [cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.