to_gif | R Documentation |
Render slides as a GIF video file. The function renders to the PDF, converts each slide in the PDF to a PNG, and then converts the deck of PNG files to a GIF file.
to_gif( from, to = NULL, density = 100, slides = "all", fps = 1, complex_slides = FALSE, partial_slides = FALSE, delay = 1, keep_intermediates = FALSE )
from |
Path to an |
to |
Name of the output |
density |
Resolution of the resulting PNGs in each slide file. Defaults
to |
slides |
A numeric or integer vector of the slide number(s) to include
in the GIF, or one of |
fps |
Frames per second in the animated GIF. |
complex_slides |
For "complex" slides (e.g. slides with panelsets or
other html widgets or advanced features), set |
partial_slides |
Should partial (continuation) slides be included in the
output? If |
delay |
Seconds of delay between advancing to and printing a new slide.
Only used if |
keep_intermediates |
Should we keep the intermediate files used to
render the final output? The default is |
Slides are rendered as a .gif
file.
with_example("slides.Rmd", requires_chrome = TRUE, { # Render gif from Rmd, html, pdf, or direct URL to_gif("slides.Rmd") })
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.