+ - 0:00:00
Notes for current slide
Notes for next slide

Reproducible reports in R Markdown

Jacquie Tran | @jacquietran | 18 Aug 2020

bit.ly/jt_rladies_2020

1 / 17

From academia to industry

2 / 17

Image credit: Andrew Petrischev

3 / 17

Image credit: Emil Widlund

4 / 17

What makes a report reproducible?

5 / 17

Four facets of reproducibility

The Carpentries, Reproducible Research with R

6 / 17

Four facets of reproducibility

The Carpentries, Reproducible Research with R

  1. Documentation
6 / 17

Four facets of reproducibility

The Carpentries, Reproducible Research with R

  1. Documentation

  2. Organisation

6 / 17

Four facets of reproducibility

The Carpentries, Reproducible Research with R

  1. Documentation

  2. Organisation

  3. Automation

6 / 17

Four facets of reproducibility

The Carpentries, Reproducible Research with R

  1. Documentation

  2. Organisation

  3. Automation

  4. Dissemination

6 / 17

R Markdown for

Documentation

7 / 17

Document as you go!

Live demo of HTML output

8 / 17

Show your "working out"

knitr::opts_chunk$set(echo = TRUE)

Live demo of HTML output

9 / 17

R Markdown for

Organisation

10 / 17

Source scripts into an R Markdown file

11 / 17

Source scripts into an R Markdown file

In the R Markdown file, source the script from within a code chunk:

source(here::here("plot_penguins.R"))
11 / 17

R Markdown for

Automation

12 / 17

Build reports on a set schedule

Job scheduling R Markdown reports via R

13 / 17

R Markdown for

Dissemination

14 / 17

Rmd: One file format, many outputs!

Render an R Markdown report to:

  • HTML
  • PDF
  • Word
15 / 17

HTML outputs are particularly powerful

Turn an R Markdown file into:

  • A slidedeck (like this one!) using {xaringan}
16 / 17

HTML outputs are particularly powerful

Turn an R Markdown file into:

  • A slidedeck (like this one!) using {xaringan}

  • An interactive dashboard using {flexdashboard}

16 / 17

HTML outputs are particularly powerful

Turn an R Markdown file into:

  • A slidedeck (like this one!) using {xaringan}

  • An interactive dashboard using {flexdashboard}

  • An e-book using {bookdown}
16 / 17

HTML outputs are particularly powerful

Turn an R Markdown file into:

  • A slidedeck (like this one!) using {xaringan}

  • An interactive dashboard using {flexdashboard}

  • An e-book using {bookdown}

  • A website using packages like {blogdown} and {distill}

16 / 17

R Markdown articles from R Studio

Yihui Xie, J.J. Allaire, & Garrett Grolemund, R Markdown: The Definitive Guide

Emily Riederer, R Markdown Driven Development

Tom Mock:

17 / 17

R Markdown articles from R Studio

Yihui Xie, J.J. Allaire, & Garrett Grolemund, R Markdown: The Definitive Guide

Emily Riederer, R Markdown Driven Development

Tom Mock:

Slides: bit.ly/jt_rladies_2020

GitHub repo: https://github.com/jacquietran/2020_aug_rladies_akl

17 / 17

From academia to industry

2 / 17
Paused

Help

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