Learning R
r
learning
Free books, courses, videos, and tutorials for learning R, with three suggested starting points and a guide for Stata users.
This guide collects books, courses, tutorials, and practice tools for students learning R in NYU Abu Dhabi methods courses. Begin with the three picks under Start here, then use the other sections as your projects need them. Installation steps and ways to run R online are on the R page.
Start here
- An Introduction to R (2024) — Free online introduction to R for beginners. Good Starting Place.
- R for Data Science (2e) — Free online book on importing, tidying, transforming, and visualizing data with the tidyverse.
- R Cookbook, 2nd Edition — Online recipe book for common R tasks, useful once you know the basics and want to look up how to do one thing.
Books and courses
- R for the Rest of Us: A Statistics-Free Introduction — Online book that teaches R without assuming a statistics background.
- R for Graduate Students (2019) — Online book written for graduate students new to R (archived copy; PDF).
- Troubleshooting Errors — Chapter of R for Graduate Students on reading and fixing common R error messages (archived copy).
- Cookbook for R — Task-oriented recipes for R by Winston Chang, including a section on graphs.
- Free programming books: R section — Community-maintained list of free books on R, part of a larger list of free programming books.
- R Programming (Coursera) — Johns Hopkins University course on programming in R and using it for data analysis.
- Datacamp — Online data-skills courses. Free Access with Github Student Developer Pack.
- Github Student Developer Pack — GitHub Education bundle of tools and services for students, which includes the Datacamp access above.
- swirl for students — Official page for swirl, a package that teaches R through interactive lessons inside the R console.
Tutorials and course notes
- R at UCLA Advanced Research Computing — R tutorials and examples from UCLA Advanced Research Computing.
- R Tutorial, Stephen Pettigrew — R tutorial page by Stephen Pettigrew.
- POLSCI219B: R resources — R resource page for a University of California, Irvine political science course (archived copy).
- R analysis, Peter Aldhous (NICAR 2017) — Session notes from a data-journalism training on analyzing data in R.
- R Fundamentals: Getting started with R — Introductory R lesson from the Becoming Visual site (archived copy).
- Beginner’s guide to R: Introduction — First part of a Computerworld hands-on series on using R for basic data analysis and visualization.
- Guide to Syntax in R — Medium article on R syntax for beginners; Medium may limit free reading.
- How I Made My First R Function — Towards Data Science post that walks through writing a first R function for a practical task.
- knowledgeR — Site named knowledgeR, hosted on rbind.io and kept here as a general R learning resource.
Video and interactive practice
- R Programming Tutorial: Learn the Basics of Statistical Computing — YouTube course that introduces the R language as a tool for statistical computing.
- R Tutorial, GeeksforGeeks — Introductory R tutorial from GeeksforGeeks, a general programming tutorial site.
- Run R code online (rdrr.io snippets) — Browser page for running short R snippets without installing R or creating an account.
Staying current
- R-Bloggers — Aggregator of blog posts about R from many authors.
- R Archives, Open Source Automation — Posts about R from the Open Source Automation blog.
- Free R-Tips, Business Science — Repository for a free newsletter of short R code tutorials.
Reference
- Posit Cheatsheets — One-page reference sheets for RStudio, the tidyverse, R Markdown, and other R tools.
Coming from Stata
- Translating Stata to R — Reference for people who already know Stata and want the equivalent R code; Stata resources are on the Stata page.