Rev. | 6259518bcd6955e20e60580680f037609c485fb4 |
---|---|
サイズ | 1,483 バイト |
日時 | 2022-02-15 23:29:58 |
作者 | Lorenzo Isella |
ログメッセージ | A script to creare an R flipbook. |
---
title: "My First Flipbook"
subtitle: "With flipbookr and xaringan"
author: "Your name here"
output:
xaringan::moon_reader:
lib_dir: libs
css: [default, hygge, ninjutsu]
nature:
ratio: 16:10
highlightStyle: github
highlightLines: true
countIncrementalSlides: false
---
```{r setup, include = FALSE}
library(flipbookr)
library(tidyverse)
knitr::opts_chunk$set(fig.width = 6, message = FALSE,
warning = FALSE, comment = "",
cache = F)
```
```{css, eval = TRUE, echo = FALSE}
.remark-code{line-height: 1.5; font-size: 80%}
@media print {
.has-continuation {
display: block;
}
}
```
```{r my_cars, include = FALSE}
cars %>%
ggplot() +
aes(x = speed) +
aes(y = dist) + #BREAK
geom_point(
shape = 21,
size = 7, #BREAK2
color = "magenta", #BREAK3
alpha = .8 #BREAK4
) + #BREAK
aes(fill = speed) +
scale_fill_viridis_c() +
theme_minimal() #BREAK
```
---
`r chunk_reveal(chunk_name = "my_cars", title = "### First flipbook!")`
---
`r chunk_reveal("my_cars", break_type = "user", title = "### Another code movie!")`
---
`r chunk_reveal("my_cars", break_type = "non_seq")`
```{r my_mtcars, include = F}
mtcars %>%
ggplot() +
aes(x = factor(cyl)) +
aes(y = mpg) +
geom_boxplot() +
geom_jitter(alpha = .5,
width = .25)
```
---
`r chunk_reveal("my_mtcars", display_type = "output")`