| export | R Documentation |
Export to various formats
export(spec, file, width = 800, height = 600)
spec |
A glyph_spec or glyph_compiled |
file |
Output file path. Extension determines format. Currently
implemented: |
width |
Width in pixels |
height |
Height in pixels |
A single self-contained .html file needs pandoc.
RStudio ships with pandoc, so this works out of the box there; elsewhere,
install pandoc and make sure it is on your PATH. Without pandoc,
export() still writes the .html file but puts the JavaScript it needs
in a <name>_files folder next to it, and tells you so. Keep the two
together when moving or sharing the plot.
Invisibly returns the output file path
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.