Chapter 2 A very brief introduction to R

This chapter is not meant to be an exhaustive be-all end-all to how to use R. It will only go through enough to complete RPMP’s content. It will, however, introduce a couple of things that I think make for good starting habits using R - which is never a bad thing!

Naturally, if you are reading this version of the RPMP material and are interested in using R, you will need to download R and RStudio.

In general, I am a huge proponent of the ‘tidy’ workflow of data analysis. While it was originally designed for data science in mind, I think it’s a valuable model for psychological science as well:

The original subject was written with this workflow broadly in mind, although it wasn’t intended to follow this closely (only to bring awareness to the general idea of modelling). For a far more comprehensive and rigorous overview of how to program in R, there is no better guide than R 4 Data Science (R4DS) by Hadley Wickham: https://r4ds.had.co.nz/.