Guides & Resources
D2MR Workflow & Course Guides
Guides and walk-throughs to get you through many of the gritty bits of D2MR.1
- Best Practices
- A collection of best practices for programming in R (for D2MR students)
- Natalie’s Style Guide
- Just for reference of what a style guide might look like – you don’t have to use it!
- Using RStudio with GitHub
- Simplified version of the complete guide from “R for the Rest of Us” below
- Setting up RStudio
- Covers the RStudio settings you are most likely to want to tweak
- Creating APA Manuscripts with Quarto
Resources
This list is updated regularly. Find a great resource that others might appreciate? Email Dr. Dowling to add to the list!
General
- STAT545
- The course website for a similar (and much more comprehensive!) course originated at UBC by Jenny Bryan
- R for Graduate Students
- A bookdown guide written by a PhD student with the grad student “true beginner” in mind
Documentation & References
Git & github
- Git
- How to Use Git/GitHub with R - Instructions for setting up your GitHub integration within RStudio, no GitHub Desktop required!
- Git user manual - Look here if you want to use Git in the terminal or command line
- Git cheat sheet
- An introduction to Git and how to use it with RStudio
- Happy Git and GitHub for the useR - A companion to STAT545 (see above)
R
- R for Data Science, second edition by Hadley Wickham
- Hands-On Programming with R by Garrett Grolemund
- User-contributed cheatsheets
- W3Schools R tutorial
- Learn-R
- Using R for psychological research - Personality Project
R Markdown
- R Markdown for Scientists by Nicholas Tierney
- R Markdown: The Definitive Guide by Yihui Xie, J. J. Allaire, and Garrett Grolemund
- R Markdown cheatsheet
Quarto
Tidyverse and R Packages
ggplot2 and Visualization
Transitioning to R
- Stata to R :: cheatsheet
- R for Stata Users (Muenchen & Hilbe)
- R for SAS & SPSS Users (Muenchen)
- From SPSS to R (Wolf)
- Switching from Matlab to R (Richards)
- R for MATLAB users (cheatsheet-ish)
Example datasets
Many/most datasets from these sources may be used for mini-projects in some capacity. Post a link in the Slack channel if you want to double check whether data you have in mind is a good fit.
Essentials
- R
- RStudio
- GitHub
- GitHub Desktop
- Not used in this class, but can be handy when RStudio’s Git pane is being finicky
- R packages (install with the
install.packages
command)2- tidyverse
- Suite of packages for data manipulation and visualization, including ggplot2
- knitr
- Dynamic report generation, necessary for Quarto/R markdown
- bibtex
- Citation management in markdown
- DescTools
- Tools for descriptive statistics
- Other useful packages:
- papaja
- Alternative to apaquarto for creating APA-style manuscripts
- psych
- Data analysis with psychologists’ common needs in mind
- stats
- Base R functions for statistical analysis, a nice complement to the psych package, but also has some conflicts with it, so be thoughtful the order you load them in
- lme4
- Fitting linear mixed-effects models
- data.table
- Fast data manipulation, not necessarily always the most cooperative with the tidyverse
- ggpubr
- Publication-ready plots
- ggsci
- Color palettes for ggplot2 based on journals, universities, and pop culture (my favorite is Futurama)
- patchwork
- Combine multiple ggplot2 plots into one
- RColorBrewer
- Color palettes for R
- vcd
- Visualizing categorical data
- papaja
- tidyverse
Footnotes
If you have stumbled upon this page without be a member of the class (hello!) you may or may not find these guides helpful, and you may even – very validly – disagree with how I present things. These guides are created specifically for the class From Data to Manuscript in R at the University of Chicago, which is a short, hands-on crash course with no prerequisites. They are by no means comprehensive, definitive, or universal.↩︎
If packages fail to install with the
install.packages
command, you can typically download them directly from the package’s GitHub page withremotes::install_github("crsh/papaja")
. Replacecrsh/papaja
with whatever follows “github.com/”.↩︎