papaja-workshop

An introductory workshop on computationally reproducible reporting for psychologists

View the Project on GitHub crsh/papaja-workshop

Friends don’t let friends copy-paste: How to create computationally reproducible APA-style manuscripts with the R package papaja

Frederik Aust & Marius Barth

Workshop description

When reporting quantitative results, psychologists routinely engage in copy-paste reporting: Statistical results are copied from the output of an analysis software and pasted into a word processor. Copy-paste reporting is tedious. If the analytic approach changes during manuscript preparation or revision, copy-pasting starts anew. More importantly, copy-paste reporting is error-prone: A substantial number of published journal articles report inconsistent statistics (e.g., Brown & Heathers, 2016; Nuijten et al., 2016; Petrocelli, Clarkson, Whitmire, & Moon, 2013). Moreover, even with the original data in hand, reported results are often difficult and sometimes impossible to reproduce (e.g., Artner et al., 2020; Eubank, 2016; Naudet et al., 2018; Stodden, Seiler, & Ma, 2018; Vilhuber, 2020). Dynamic documents are a time-saving, fault-preventing alternative to copy-paste reporting. By fusing manuscript and analysis scripts, dynamic documents automate reporting of results, ensure that the reported statistics are consistent, and facilitate documentation and reproduction of analyses. Through a combination of lectures and exercises, this workshop introduces the R package papaja, which is designed to create dynamic, submission-ready, APA-style manuscripts and revision letters.

Learning objectives

This is a modular course. Depending on the duration of the workshop, we cannot cover all topics. At a minimum, upon course completion participants will

  1. be familiar with key concepts of computational reproducibility
  2. have gained basic proficiency of R Markdown
  3. be able to create complete APA-style manuscripts including citations, figures, tables, and appendices.

For additional topics, see the overview of workshop modules below.

Prerequisites

Participants should have some basic knowledge of R and some experience with RStudio.

For the hands-on parts of the workshop, please install R (version 4.0.0 or higher), RStudio, and the R packages tinytex and papaja. Finally, run the following command to install the TinyTeX LaTeX distribution designed for use with R Markdown.

# Install remotes package if necessary
if(!requireNamespace("remotes", quietly = TRUE)) install.packages("remotes")

# Install the latest development snapshot from GitHub
remotes::install_github("crsh/papaja")

# Install TinyTeX distribution
install.packages("tinytex")
tinytex::install_tinytex()

If you prefer an alternative environment (e.g. Visual Studio Code instead of RStudio or MikTeX instead of TinyTeX), refer to the papaja manual for detailed instructions. Note, we cannot assist you in case you experience problems related to your custom setup.

To ensure everyone can follow along, we provide a ready-to-use RStudio.cloud workspace as a backup option.

Modules

Module Topic Duration (h) Slides Exercises Solutions
Key concepts   0.75 HTML HTML -
  Computational reproducibility 0.50      
  Dynamic documents 0.25      
R Markdown   2.00 HTML HTML HTML
  Document structure 0.25      
  YAML front matter 0.75      
  Scientific writing 0.50      
  Incorporating R code 0.50      
papaja   4.00 HTML HTML HTML
  YAML front matter 0.50      
  Reporting statistics 1.00      
  Tables and figures 0.50      
  Citing R packages 0.25      
  Appendices 0.25      
  Extending apa_print() 1.00 HTML HTML HTML
  Revision letters 0.50 HTML HTML HTML
Collaboration   0.50 HTML - -
  Overview of approaches 0.25      
  Git & GitHub showcase 0.25      
Outlook   0.50      
  Preventing code rot 0.50 HTML - -

Citation

If you use these materials, please cite them as follows.

Aust, F., & Barth, M. (2023). Friends don’t let friends copy-paste: How to create computationally reproducible APA-style manuscripts with the R package papaja. https://frederikaust.com/papaja-workshop/

Please link to the workshop website.