htmlSVG: Run plotting code and view svg in RStudio Viewer or web...

View source: R/inlineSVG.R

htmlSVGR Documentation

Run plotting code and view svg in RStudio Viewer or web browser.

Description

This is useful primarily for testing. Requires the htmltools package.

Usage

htmlSVG(code, ...)

Arguments

code

Plotting code to execute.

...

Other arguments passed on to svglite.

Examples

if (interactive() && require("htmltools")) {
  htmlSVG(plot(1:10))
  htmlSVG(hist(rnorm(100)))
}

svglite documentation built on June 22, 2024, 6:46 p.m.