Learning with R!

This list was designed for academic researchers (focus here = psychology) wishing to transition to R, wishing to learn R, and wishing to do data analyses in R. Please list any resources you like, along with any notes that might be helpful for people discerning which tools they’d like. Let’s assume that readers of this list may be experienced with SPSS and have no programming experience. Please note if something is especially technical or especially good for beginners.
In general, one might recommend one good introduction to the R language, one good introduction to the tidyverse, and one good introduction to doing statistical analyses within R.

< feel free to edit anything in this document, text, curate, etc.; consider this a living, communal document >

General Introduction to the R language

  • Learning Statistics with R

https://learningstatisticswithr.com

This is a fantastic stats text that walks you through everything you need to know for basic statistical analyses in R. The language is taught by way of statistical analyses.

  • R for Dummies
    This book is an excellent “all around introduction” to R for beginners. You will learn how to write functions, work with strings, how to subset, and pretty much everything else. It’s not focused on data analysis, but it’s a great introduction to the R language, object types, etc. It is written for a novice. Individuals wishing to become fluent in R should know the contents of this book.
    https://www.amazon.com/R-Dummies-Andrie-Vries/dp/1119055806
  • The R Book

This is a handy desk reference and explains virtually everything about working in R. It’s in-depth but includes lots of applications.
https://www.amazon.com/R-Book-Michael-J-Crawley/dp/0470973927/ref=dp_ob_title_bk

  • Introduction to R
    This is a more technical (but free, and from the R community) introduction to how R works written by the programmers who maintain the language. This is not a stats resource but the reference manual for the R language itself. It’s similar to the above, and is a good read--especially if you have some familiarity with R / programming or are fine with a more technical read.
    https://cran.r-project.org/doc/manuals/r-release/R-intro.pdf

  • www.datacamp.com

They offer short, free, introductory courses in R and other programming languages.

  • The Pirate’s Guide to R (yarr!)
    For a more fun introduction to R, check out this free online book. It focuses in depth on the language and object types, and it has plenty of “R” puns to go around.
    https://bookdown.org/ndphillips/YaRrr/

  • CourseKata’s Introduction to Statistics: A Modeling Approach

A free interactive online textbook (bit.ly/ckstats17, a link to a version you can access through Canvas LMS so you can see how it would look for your students) that uses R to teach students introductory statistics concepts. You can also preview the “textbook” at coursekata.org. Integrates datacamp light (as well as other formative assessment questions, videos, text, pictures) so that R exercises are interleaved with statistical concepts. (Different from the traditional approach of having materials that teach the “concepts of statistics” separate from “lab exercises” where you get to do some analysis.)

Doing Statistical Analyses with R

How do you actually execute a data analysis project in R? There are many books. Some are more math-heavy and technical, some are less so.

  • Learning Statistics with R
    This is a full grad-level stats text designed for psychologists who wish to run full analyses from start to finish. It also includes an overview of how to use R. This is quickly becoming a popular reference for aspiring R stats users. It is also free online.
    https://learningstatisticswithr.com/
  • Statistics: An Introduction using R

Another statistics text walking you through data analysis using R. This shows ins and outs of data analysis using regression that are sometimes skipped. Note: The R Book (above) has some similar content to this book, and they are by the same author.
https://www.amazon.com/Statistics-Introduction-Michael-J-Crawley/dp/1118941098/ref=sr_1_1?crid=14IK7332COS1S&keywords=statistics+an+introduction+using+r&qid=1555432806&s=gateway&sprefix=statistics+an+introduction+%2Caps%2C180&sr=8-1

  • Practical Data Science with R

A “what to do in R” book concentrating on working with data and supervised machine learning.

http://practicaldatascience.com/ 

  • Great guide to making tables!

https://gist.github.com/davebraze/f73cc377fdee3b0b0373f0abc5a9725b


Tidyverse / Data Viz

The tidyverse is a set of R packages that is designed to make doing life with R easier. The tidyverse has a different workflow than base R and thus represents a “different flavor” of R. Often there is a “base R” way of doing things and a “tidyverse” way of doing things. Often the tidyverse is easier to read.

        https://r-graphics.org/

  • Advanced R

This might be a bit much for beginning R programmers, but it’s designed very well for people who are more familiar with the language. As you “level up” in your R abilities this resource is especially helpful for writing time-saving functions (among many other things)

http://adv-r.had.co.nz/


Special Topics Books

Place special-topics books here, such as books or resources for SEM, HLM/MLM, etc.

There are several books in this list, curated by the maintainers of “lavaan,” one of the most popular tools for structural equation modeling in R.

http://lavaan.ugent.be/resources/books.html

  • Sacha Epskamp’s Course on Structural Equation Modeling

Includes video lectures, slides, and a code repository

http://sachaepskamp.com/SEM2019

Online Courses, Github Repositories, Etc.

The internet is filled with fantastic resources for R. Some are full online courses. Some are R packages that teach you how to use R. Some are github folders that contain entire workshops or useful tutorials. Place them here.

  • Data Science for Social Scientists
    An online version of Dr. Richard Landers’ graduate course in R, progressing learners from “never used R” to “intermediate” through a full semester of online exercises, starting with basic programming skills, progressing through traditional statistical analyses, and concluding with natural language processing, machine learning/artificial intelligence, and creation of web applications all within RStudio. Each week of material includes real-time online exercises, contextualizing videos, take-home projects, and debriefing videos.  Good for self-teaching or as the basis for a new graduate course.
    http://datascience.tntlab.org 

  • RStudio Primers

This online resource teaches basic data science skills through interactive tutorials. It covers basic data manipulation, data visualization, data tidying, iteration problems, and writing functions. https://rstudio.cloud/learn/primers

  • “Swirl”: an R package that teaches you R
    This is a unique approach, an R package that is a self-guided tutorial.
    https://swirlstats.com/
  • A Jupyter + R ( + mybinder.org) tutorial for social scientists
    This repository contains a Jupyter notebook file which walks you through the basics of using notebooks and RStats for reproducible data analysis. It starts with a general guide to the notebook format and how to install the necessary software. Then it goes through an example using R to load data, filter missing values, create graphs and run statistical tests.
    https://github.com/InfantLab/NotebookDemos 

Open Datasets, Papers with Easy-to-Read Code, Etc.

There may be great examples of open datasets, papers with published (preferably annotated) code that people might follow to improve their R skills. Place them here.

Dynamic Data Visualisation

Provides an overview of work concerning the development and deployment of dynamic data visualisations for psychology and behavioural science more generally. Includes links to papers/data sets.

https://sites.google.com/site/psychvisualizations/

RStudio Webinar

http://www.citizen-statistician.org/2019/06/rstudio-cloud-in-the-classroom/

Workshops

Place links to full R-based workshops here. These may be topical or focused on learning R.


Useful R Packages / Links to Package Lists

Are there specific R packages outside the tidyverse that you recommend? Are there lists of R packages that we could link to? List them here.

  • ordinal is a package specifically for analyzing ranked or ordinal scale data (instead of assuming survey rating responses are a continuous measure.

Simulation Resources

One useful purpose of R is that it contains many resources for simulating data.

https://besjournals.onlinelibrary.wiley.com/doi/full/10.1111/2041-210X.12504

https://debruine.github.io/faux/index.html

(manuscript here: https://psyarxiv.com/baxsf)

Unsure where to classify this: