knitr::opts_chunk$set(echo = TRUE, warning = F, message = F) library(tidyverse) library(flipbookr)
try(source("../../../../../R/base_parse_reveal_xaringan.R")) try(source("../../../../../R/mini.R"))
You can try a flipbook mini. At this time, the output can only be plots
ggplot(data = cars) + aes(x = speed) + aes(y = dist) + geom_point(shape = 21, alpha = .8, size = 5, color = "white") + aes(fill = dist) + scale_fill_viridis_c(option = "magma", end = .7) + labs(title = "That cars data again!") + theme_minimal() + theme(plot.background = element_rect(fill = "snow3"))
I'm also echoing the code. It produces the gif (saved externally) and then embeds it in the html file.
chunk_gif_flipbook_embed(chunk_name = "my_source_code_chunk", title = "Side-by-side co-evolution!")
chunk_gif_flipbook_embed(chunk_name = "my_source_code_chunk", title = "That's pretty!", display_type = "output")
chunk_gif_flipbook_embed(chunk_name = "my_source_code_chunk", title = "What do you think this will build?", display_type = "code")
Please help us spread the word about flipbooks. Let your audience know how you created your flipbook with a quick acknowledgement, for example:
The flipbooked portion of this presentation was created with the {flipbookr} package. Get it at remotes::install_github("EvaMaeRey/flipbookr")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.