# This is the recommended set up for flipbooks # you might think about setting cache to TRUE as you gain practice --- building flipbooks from scratch can be time consuming knitr::opts_chunk$set(fig.width = 6, message = FALSE, warning = FALSE, comment = "", cache = F) library(flipbookr) library(tidyverse)
datasets::mtcars %>% as_tibble()
r chunk_reveal("mtcars_data")
{SLOWggplot}
mtcars %>% ggplot() + #BREAK aes(x = disp) + aes(y = mpg) + #BREAK geom_point(position = "jitter") + #BREAK aes(colour = as_factor(cyl))
r chunk_reveal("mtcars_plot", break_type = "user")
There are a number of break types that help you customize the flipbook
mtcars %>% ggplot() + aes(x = disp) + aes(y = mpg) + geom_point( size = 3, alpha = 0.5, colour = "blue") + aes(shape = as_factor(cyl)) + ggtitle("An example plot using the infamous mtcars")
r chunk_reveal("mtcars_non_seq")
```{css, eval = TRUE, echo = FALSE} .remark-code{line-height: 1.5; font-size: 80%}
@media print { .has-continuation { display: block; } }
code.r.hljs.remark-code{ position: relative; overflow-x: hidden; }
code.r.hljs.remark-code:hover{ overflow-x:visible; width: 500px; border-style: solid; } ```
This minimal flipbook assumes you are online when you build and view. It is going to find the most recent remark.js info online.
xaringan/remark.js slideshows are not self contained, single file slide shows. Make sure you ship all the associated files that are created to display your flipbooks/slideshows. I like to push .html and associated files to github repository and use Github Pages to host for beyond local sharing. :-)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.