Skip to main content

Online Learning Resources: R

Updated January 2024 by Ritika Giri

Maybe you’ve seen the dashboards or reports your colleagues produce with Shiny or R Markdown. Perhaps you’ve heard about how R can support a reproducible workflow, or you’re hoping to make more effective data visualizations. Or maybe you just need to use one of the thousands of free packages available. Whatever the reason, R is a great language for statistical analysis, data manipulation, and visualization.  Below are some resources to help you get started, improve your skills, or start developing R tools for others.

Getting Started 

To get started with R, see our instructions for installing R and RStudio or accessing them online. 

R for Data Science (2nd edition)
Hadley Wickham, Mine Çetinkaya-Rundel, Garrett Grolemund
This is the resource I recommend most frequently for people looking to build data analysis and manipulation skills in R. You’ll learn how to get your data into R, get it into the most useful structure, transform and visualize it. It covers the tidyverse set of packages and includes exercises in each chapter. There’s an accompanying exercisesolution book. There’s also an online community of folks using this book to learn if you’re looking for support or a social learning experience!  

YaRrr! The Pirate’s Guide to R
Nathaniel D. Phillips
The purpose of this book is to help you learn R from the ground-up. It covers the basics of data types in R, importing and manipulating data, plotting, statistics, and regression models. 

Learning statistics with R: A tutorial for psychology students and other beginners
Danielle Navarro
This online book covers statistical theory, probability, hypothesis testing, categorical and continuous data analysis, linear regression, factorial ANOVA and Bayesian statistics. It is particularly well-suited for those in psychology as it covers the statistical methods most commonly used in the field. The book is associated with the lsr package on CRAN and GitHub.   

Getting Better 

Tidy Tuesday Screencasts
David Robinson
Dave analyzes data from the Tidy Tuesday project that he’s never seen before. See how an expert data analyst attacks a new dataset using mostly tidyverse packages in R. 

Resources from Posit
Posit supports development of RStudio and several key R packages. They maintain a resource guide page that includes blogs, videos and cheatsheets. You can filter for topics of interest. If you’re looking for inspiration or to see what’s new with R, try the conference videos from previous years (also present as a YouTube playlist). 

Text Mining with R
Julia Silge, David Robinson
Have text data? Use R? When exploring your data, the tidytext package makes the process easy! Learn how to process your data and look at differences between groups. For more advanced analysis, you’ll need to move on to additional packages, but tidytext makes the often painful process of exploratory analysis of text data actually fun. 

Statistical Modelling Examples
UCLA Statistical Consulting
Need to see some example code of how to run a specific statistical model in R? The UCLA Statistical Consulting group is the place to go. They have examples of how to run common models in R, Stata, SPSS, SAS, and MPlus. They also walk you through the reasoning for various modeling choices. 

R Cookbook (2nd edition)
JD Long, Paul Teetor
Are you familiar with R, but struggling to figure out how to do something specific? That’s where a cookbook comes in. The R Cookbook gives you code snippets along with the background and details you need to understand those snippets. For example: how to convert data to z-scores, extract a substring, or work with time series data.   

Programming and Development with R 

Advanced R
Hadley Wickham
Looking to level-up your R skills or explore R as a programming language? This book is an essential resource as you move from using R for data analysis to developing tools for yourself or others.  

Efficient R Programming
Colin Gillespie, Robin Lovelace
This book teaches you how to be an efficient programmer as well as how to make your R code computationally efficient. Concepts include understanding how to use R’s vector objects to avoid for loops, knowing how to set .Rprofile and .Renviron files, and harnessing R’s excellent C++ interface to do the ‘heavy lifting’. 

The Art of R Programming
Norman Matloff
If you have programming skills in another language and want to approach learning R as a programming language (rather than a data analysis tool), this is the book for you. It starts at the beginning without assuming you know R, but those who have been using R for a while will also likely learn a lot from it (did you know “{” is a function?). This book will help you learn why R works how it does. 

R Packages (2nd edition)
Hadley Wickham, Jennifer Bryan
Packages are the fundamental units of reproducible R code. They include reusable R functions, the documentation that describes how to use them, and sample data. In this book you’ll learn how to turn your code into packages that others can easily download and use. 

Looking for more R? 

The Big Book of R has a collection of mostly free resources for different general and field-specific topics. 

There are many online courses on Coursera using or focused on R. Many are free if you do not want the paid credential for completion.