background-image: url(https://upload.wikimedia.org/wikipedia/commons/b/be/Sharingan_triple.svg)
options(htmltools.dir.version = FALSE) if (!requireNamespace("xaringanExtra", quietly = TRUE)) { warning( "These example slides use panelsets from {xaringanExtra}, which is not ", "installed. You may notice some unusual text on the panelset slides." ) } else { xaringanExtra::use_panelset() # So we can add some slides with fancy panelsets! }
???
Image credit: Wikimedia Commons
You can install the current version of renderthis from GitHub:
# install.packages("remotes") remotes::install_github("jhelvy/renderthis")
--
.pull-left[
]
--
.pull-right[
Rmd | |--> social (png) | |--> html | |--> pdf | |--> png | |--> gif | |--> mp4 | |--> pptx
]
???
For pdf
, png
, gif
, mp4
, and pptx
output types, if you want to render a new slide for each increment on incremental slides, set partial_slides = TRUE
in any of the following render functions:
to_pdf() to_png() to_gif() to_mp4() to_pptx()
--
For example, the following code would render this slide as two slides in a pdf instead of one:
to_pdf("slides.Rmd", partial_slides = TRUE) to_pdf("slides.html", partial_slides = TRUE)
Note: This option requires the chromote and pdftools packages.
"Complex" slides are slides that contain panelsets (like the one on this slide) or other html widgets / advanced features that might not render well as a pdf. To render these on separate slides, set complex_slides = TRUE
in to_pdf()
, to_png()
, to_gif()
, to_mp4()
, or to_pptx()
.
.panelset[ .panel[.panel-name[Chunk]
head(mtcars)
]
.panel[.panel-name[Output]
head(mtcars)
] ]
slides
argument to control which slides get builtExamples rendering from PDF to PNG:
# Render the first or last slide only to_png(from = "slides.pdf", to = "first_slide.png", slides = "first") to_png(from = "slides.pdf", to = "last_slide.png", slides = "last") # Choose subsets of slides to_png(from = "slides.pdf", slides = c(1, 3, 5)) to_png(from = "slides.pdf", slides = -1) # Negative indices remove slides # Render all slides to_png(from = "slides.pdf", slides = "all")
class: center, middle, inverse
Slides created via the R package xaringan.
Package documentation at https://jhelvy.github.io/renderthis
Visit xaringan.club for more {xaringan} tools!
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.