## NB: By default the template will create a new subdirectory with its files inside.
library(flipbookr) library(here) library(tidyverse) library(kjhslides)
## Configure the slides kjh_register_tenso() # Default fonts. Comment out if you don't have Tenso and Berkeley fonts. kjh_set_knitr_opts() kjh_set_slide_theme() # ggplot theme to go with slides. Set tenso = FALSE if necessary. kjh_set_xaringan_opts()
class: center middle main-title section-title-1
.class-info[
Data Wrangling: Session 1
.light[Kieran Healy
Statistical Horizons, April 2022
]
]
layout: true class: title title-1
--
.box-inv-1.medium[Blah]
--
.box-inv-1.medium[Blah]
--
.box-inv-1.medium.sp-after[Blah]
layout: false class: center
layout: true class: title title-1
monospace()
].pull-left[
]
.pull-right[
]
layout: true class: title title-1
library(palmerpenguins)
r chunk_reveal("penguin_tabs", widths = c(35,65), title = "# Breaks")
penguins %>% filter(year != 2007) %>% group_by(species) %>% summarize(across(starts_with("bill"), list(mean = mean, sd = sd), .names = "{.fn}_{.col}", na.rm = TRUE))
as_tibble(cars) %>% filter(speed > 4) %>% ggplot() + aes(x = speed) + aes(y = dist) + #BREAK geom_point( alpha = .8, color = "blue" ) + #BREAK aes(size = speed) #BREAK
r chunk_reveal("my_cars", break_type = "auto", title = "# Chunk Breaks")
.pull-left.w35[
Make sure the chunk has the string "codefig" in its label to protect against breaking refs.
library(tidyverse) library(gapminder) p <- ggplot(data = gapminder, mapping = aes(x = gdpPercap, y = lifeExp)) + geom_point() p
]
--
.pull-right.w60[
knitr::include_graphics( knitr::fig_chunk("codefig-first-plot", "png") )
]
layout: false
.center[
layout: true class: title title-1
.pull-left[
.pull-right[
.pull-left.center[
--
.pull-right[.box-inv-1.medium[Introduction]]
--
.pull-right[.box-inv-1.medium[Deep-dive]]
--
.pull-right[.box-inv-1.medium[Some more]]
.pull-left[
Item L1
Item L2
Item L3 ]
--
.pull-right[
Item R1
Item R2
Item R3 ]
.right[]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.