Meghan Hall
Department of Statistics & Data Science
Carnegie Mellon University
June 25, 2021
Presentations with xaringan
making slides with .Rmd
Tips for the final report
what needs to be included
how to get a great grade
An overview of the data
what's included, what's not included, what's missing
at the appropriate level of detail
An overview of the data
what's included, what's not included, what's missing
at the appropriate level of detail
Your questions
plots and summaries
be thorough! a very short summary will not suffice
describe the conclusion, not the graph
An overview of the data
what's included, what's not included, what's missing
at the appropriate level of detail
Your questions
plots and summaries
be thorough! a very short summary will not suffice
describe the conclusion, not the graph
Conclusions
limitations & ideas for future work
what other data do you think could be useful?
Take care with your plots
consistent colors, plot themes, customize beyond the standard, etc.
if plots go together, use cowplot
!
Take care with your plots
consistent colors, plot themes, customize beyond the standard, etc.
if plots go together, use cowplot
!
Show what you've learned in the class
use plots appropriately
use a variety of plot types (and tables!)
Take care with your plots
consistent colors, plot themes, customize beyond the standard, etc.
if plots go together, use cowplot
!
Show what you've learned in the class
use plots appropriately
use a variety of plot types (and tables!)
Leave the .html output code-free
edit your setup chunk to echo = FALSE
Each team member needs to speak
Each team member needs to speak
Introduce the data set, briefly cover each question
probably not time to discuss each plot
Each team member needs to speak
Introduce the data set, briefly cover each question
probably not time to discuss each plot
Touch on limitations & ideas for further work
what other data would you like access to?
Each team member needs to speak
Introduce the data set, briefly cover each question
probably not time to discuss each plot
Touch on limitations & ideas for further work
what other data would you like access to?
My recommendation: practice but don't memorize
xaringan
Presentations with R Markdown
.html output
easy to incorporate plots & code
other options: ioslides, Slidy, Beamer
Pros:
easy to customize
looks great
Cons:
hard to share without hosting it somewhere
easiest with a web connection
xaringan
Get started:
install the xaringan
package
File > New File > R Markdown > From Template > Ninja Presentation
template file has lots of examples
Chapter 7 of R Markdown: The Definitive Guide
xaringan
basicsSlide formatting made possible by Markdown
headings, bullet points, etc.
can add links & images
*Hello* my name is **Meghan**- This- makes- bullet points
Hello my name is Meghan
# This is a slide heading## This is a smaller heading### This is yet a smaller heading
The course website is linked [here](http://cmu-36315.netlify.app/).center[].right[*Art by Allison Horst*]
The course website is linked here
Art by Allison Horst
xaringan
basicsSlide formatting made possible by Markdown
headings, bullet points, etc.
can add links & images
Can add code & plots with chunk options
all thanks to knitr
Resources:
R Markdown reference guide
R Markdown cookbook
chunk option details
```{r penguins-1, eval = FALSE}penguins %>% count(species) %>% ggplot(aes(x = reorder(species, -n), y = n, fill = species)) + geom_bar(stat = "identity", show.legend = FALSE) + scale_fill_viridis_d(option = "E") + labs(x = NULL, y = NULL) + theme_linedraw()```
penguins %>% count(species) %>% ggplot(aes(x = reorder(species, -n), y = n, fill = species)) + geom_bar(stat = "identity", show.legend = FALSE) + scale_fill_viridis_d(option = "E") + labs(x = NULL, y = NULL) + theme_linedraw()
```{r penguins-2, echo = FALSE, fig.height = 5, fig.align = "center"}penguins %>% count(species) %>% ggplot(aes(x = reorder(species, -n), y = n, fill = species)) + geom_bar(stat = "identity", show.legend = FALSE) + scale_fill_viridis_d(option = "E") + labs(x = NULL, y = NULL) + theme_linedraw()```
### .center[the `penguins` data set]```{r kable-1, echo = FALSE}penguins %>% count(species) %>% kable("html") %>% kable_styling(font_size = 16, position = "center", full_width = F) %>% row_spec(0, bold = T, color = "white", background = "#bb0000")```
penguins
data setspecies | n |
---|---|
Adelie | 152 |
Chinstrap | 68 |
Gentoo | 124 |
---title: "Our Sample Presentation"subtitle: "for learning xaringan"author: "Meghan Hall"institute: "Carnegie Mellon University"date: "2021-06-25"output: xaringan::moon_reader: lib_dir: libs nature: highlightStyle: github highlightLines: true countIncrementalSlides: false---
setup
chunkSimilar to that in other .Rmd documents
load packages, add themes
can set global chunk options
```{r setup, include = FALSE}library(kableExtra)library(tidyverse)library(palmerpenguins)options(knitr.kable.NA = '')options(htmltools.dir.version = FALSE, htmltools.preserve.raw = FALSE)knitr::opts_chunk$set(fig.retina = 3, warning = FALSE, message = FALSE, fig.path = "figs/Lec14/")```
xaringan
Some built-in themes
list here: https://github.com/yihui/xaringan/wiki/Themes
xaringanthemer
can easily create a custom color palette based on one color
Or add even more css if you prefer!
not at all required
Lecture 15 Monday
interactive options
also: presentation sign-ups
Homework 5 due Tuesday
Lab 10 on Tuesday
Presentations with xaringan
making slides with .Rmd
Tips for the final report
what needs to be included
how to get a great grade
Keyboard shortcuts
↑, ←, Pg Up, k | Go to previous slide |
↓, →, Pg Dn, Space, j | Go to next slide |
Home | Go to first slide |
End | Go to last slide |
Number + Return | Go to specific slide |
b / m / f | Toggle blackout / mirrored / fullscreen mode |
c | Clone slideshow |
p | Toggle presenter mode |
t | Restart the presentation timer |
?, h | Toggle this help |
Esc | Back to slideshow |