class: center, middle, inverse, title-slide # Present with style ## AE 27 ### STA199 ### Duke University ### April 15 2022 --- class: center, middle ## Ninja presentations in R with `xaringan` ![](img/xaringan-hex.png) --- # Hello World! - The presentation is created using the [`xaringan`](https://github.com/yihui/xaringan) package - Click the `Knit` (to `moon_reader`) button to compile your presentation - The output is an HTML file that you can open in your browser --- class: inverse, center, middle # Why xaringan? <img src="img/kakashi-sensei.jpg" width="30%" style="display: block; margin: auto;" /> --- # xaringan Building your presentation in R lets you: - simplify slide creation with automatic arrangement -- - include R plots seamlessly (say 'goodbye' to low resolution screenshots or messy exports/imports) -- - ~~fix~~ edit all slides at once when you make a typo -- - show off your slides to the world by putting the knitted HTML on your website -- - make slides interactive (e.g. html widgets) -- - make beautiful equations with LaTeX: -- $$ y = \beta_0 + \beta_1 x_1 + \beta_2 x_2 $$ --- # Getting started Use `---` to separate slides and `--` for incremental builds within a slide -- Arrange the text in two columns: .pull-left[ Here is the text in column 1 `\(^*\)` ] .pull-right[ Here is the text in column 2 - Point 1 - Point 2 ] .footnote[ [*] And add footnotes ] --- # Plots <img src="xaringan-presentation_files/figure-html/boxplot-1.png" width="75%" style="display: block; margin: auto;" /> --- # Tables On this slide, we have summary statistics for the bill depth by species. |species | mean| median| sd| |:---------|------:|------:|-----:| |Adelie | 18.346| 18.40| 1.217| |Chinstrap | 18.421| 18.45| 1.135| |Gentoo | 14.982| 15.00| 0.981| --- ## Plot and text .pull-left[ - Here is some text - Here is more text ] .pull-right[ <img src="xaringan-presentation_files/figure-html/barplot-1.png" width="100%" style="display: block; margin: auto;" /> ] --- # Adding images <div class="figure" style="text-align: center"> <img src="img/penguins.png" alt="Image credit: Artwork by @allison_horst" width="50%" /> <p class="caption">Image credit: Artwork by @allison_horst</p> </div> We can also make an image the full page. --- background-image: url("img/penguins.png") background-size: cover --- # Interactive data frame!
--- # Presentation tips - Be terse -- - A picture's worth a thousand words -- - Script the first two lines of your talk -- - Number the slides in the corner -- - Plan 1-2 minutes per slide -- - Practice with a friend! --- # Learn more about xaringan - Want to find out more about `xaringan`? See https://slides.yihui.name/xaringan/#1. - Explore cool custom themes like that of [Kakashi sensei](https://github.com/malcolmbarrett/kakashi) - Use the `xaringanthemer` package for more styling options: https://pkg.garrickadenbuie.com/xaringanthemer. - Use the `xaringanExtra` package for more customization: https://pkg.garrickadenbuie.com/xaringanExtra. - When in doubt, `yolo` --- # Acknowledgements - Parts of this presentation were adapted or inspired from slides by [Dr. Yihui Xie](https://yihui.org/) (creator of `xaringan` package) and from [Prof. Mine Çentinkaya-Rundel](https://mine-cr.com/) - Find more art by Prof. Allison Horst [here](https://github.com/allisonhorst/stats-illustrations)