class: title-slide, center, middle # Reproducible Reporting with R Markdown --- .footnote[Slide adapted from [R Markdown for Medicine](https://rmd4medicine.netlify.app/) by [Alison Hill](https://alison.rbind.io/project/rmd4medicine/), [CC BY 4.0](https://rmd4medicine.netlify.app/license/)] # What is R Markdown? 1. An authoring framework for data science. 1. A document format (`.Rmd`). 1. An R package named `rmarkdown`. 1. A file format for making dynamic documents with R. 1. A tool for integrating prose, code, and results. 1. A computational document. 1. Wizardry. --- # What is R Markdown? 1. ["An authoring framework for data science."](https://rmarkdown.rstudio.com/lesson-1.html) (✔️) 1. [A document format (`.Rmd`).](https://bookdown.org/yihui/rmarkdown/) (✔️) 1. [An R package named `rmarkdown`.](https://rmarkdown.rstudio.com/docs/) (✔️) 1. ["A file format for making dynamic documents with R."](https://rmarkdown.rstudio.com/articles_intro.html) (✔️) 1. ["A tool for integrating text, code, and results."](https://r4ds.had.co.nz/communicate-intro.html) (✔️) 1. ["A computational document."](http://radar.oreilly.com/2011/07/wolframs-computational-documen.html) (✔️) 1. Wizardry. (🧙) .footnote[Slide adapted from [R Markdown for Medicine](https://rmd4medicine.netlify.app/) by [Alison Hill](https://alison.rbind.io/project/rmd4medicine/), [CC BY 4.0](https://rmd4medicine.netlify.app/license/)] --- # Replication/reproducibility crisis? <br><br> .center[ ![](https://media.giphy.com/media/11fDMHAzihB8D6/source.gif)) ] .footnote[Slide adapted from [R Markdown for Medicine](https://rmd4medicine.netlify.app/) by [Alison Hill](https://alison.rbind.io/project/rmd4medicine/), [CC BY 4.0](https://rmd4medicine.netlify.app/license/)] --- # How does R Markdown work? .center[ <img src="images/rmarkdown/Knit-to-html.jpg" width="85%" /> ] .footnote[Slide adapted from [R Markdown for Medicine](https://rmd4medicine.netlify.app/) by [Alison Hill](https://alison.rbind.io/project/rmd4medicine/), [CC BY 4.0](https://rmd4medicine.netlify.app/license/) | Artwork by [Desireé De Leon](https://desiree.rbind.io/)] --- # How does R Markdown work? .center[ <img src="images/rmarkdown/doc-live.jpg" width="85%" /> ] .footnote[Slide adapted from [R Markdown for Medicine](https://rmd4medicine.netlify.app/) by [Alison Hill](https://alison.rbind.io/project/rmd4medicine/), [CC BY 4.0](https://rmd4medicine.netlify.app/license/) | Artwork by [Desireé De Leon](https://desiree.rbind.io/)] --- # What is inside? .center[ <img src="images/rmarkdown_wizards.png" width="5303" /> ] .footnote[Artwork by [@allison_horst](https://twitter.com/allison_horst)] --- # What is inside? .center[ <img src="images/rmarkdown/doc-make.jpg" width="1061" /> ] .footnote[Slide adapted from [R Markdown for Medicine](https://rmd4medicine.netlify.app/) by [Alison Hill](https://alison.rbind.io/project/rmd4medicine/), [CC BY 4.0](https://rmd4medicine.netlify.app/license/) | Artwork by [Desireé De Leon](https://desiree.rbind.io/)] --- # R Markdown Tutorial <iframe src="09-rmarkdown_handout.html" width="100%" height="400px"></iframe> 🔗 Click [here](09-rmarkdown_handout.html) to access the tutorial. --- # General advice .footnote[Slide adapted from [R Markdown for Medicine](https://rmd4medicine.netlify.app/) by [Alison Hill](https://alison.rbind.io/project/rmd4medicine/), [CC BY 4.0](https://rmd4medicine.netlify.app/license/)] -- ✔️ **Document your document:** use YAML to set up meaningful metadata -- ✔️ **Style your document:** use YAML to add options to your chosen output format -- ✔️ **Organize your text:** use markdown headers with `#` -- ✔️ **Organize your code:** use `knitr` chunk labels -- ✔️ **Style your text:** use markdown **bold**, _italics_, bullets
and lists
-- ✔️ **Style your output:** use `knitr` chunk options -- ✔️ 🧶 early, 🧶 often --- class: inverse, center, middle # Q & A
05
:
00
--- class: inverse, center, middle # That's a wrap! ## Don't forget to check out [resources](https://uopsych-r-bootcamp-2020.netlify.app/resources/) 💡 ![](https://media.giphy.com/media/OZbGrdp7FiDiE/giphy.gif)