08/04/2014 @ JSM, Boston

A word of caution

Take-home message

# install R, and
install.packages('knitr')
# and optionally install RStudio (http://www.rstudio.com)

I know you click, click, copy and paste

But imagine you hear these words after you finished a project

Please do that again! (sorry we made a mistake in the data, want to change a parameter, and yada yada)

Automation! Automation! Automation!

Basic ideas of dynamic documents

  • code + narratives = report
  • i.e. computing languages + authoring languages

    We built a linear regression model.
    
    ```{r}
    fit <- lm(dist ~ speed, data = cars)
    b   <- coef(fit)
    plot(fit)
    ```
    
    The slope of the regression is `r b[1]`.
  • an example

Reproducible code + narratives

Reproducible research in the past

  • Sweave (Leisch, 2002)
  • R + LaTeX

Oh LaTeX…

Learning new tools

A quick intro to knitr (and rmarkdown)

Wow, that looks cool!

But how do I change font size / color / page width /…?

The knitr book

Be patient, and long live reproducible research!