Free R Learning resources

Free online books to learn R for reproducible data analysis.

Basics

1. R for Data Science (R4DS)

The absolute bible and best introduction to the “Tidyverse”, a very special way of handling data and programming that is very powerful due to its simplicity and clarity. I actually don’t write a single script without using the core packages of the Tidyverse. The book is written in a clear and very readable way and contains a lot of examples and exercises to play around with.

2. An Introduction to R

Also quite a good start to get going with R, somewhat differently oriented than R4DS.

3. R for Health Data Science

Very good uptodate e-book specific to questions from Health Data Science. Perfect supplement or sequel to R4DS. The authors have developed their own package finalfit that takes the philosophy of the Tidyverse and applies it to statistical methods for health data analysis. The functions from the package are super convenient for clinical analyses.

4. The tidyverse style guide

The right style is everything. I can only recommend that you adopt a consistent style right from the start, and Hadley Wickham has already said everything about this in this very short e-book.

Advanced/more specific topics

1. ggplot2: Elegant Graphics for Data Analysis

Everything to about visualization in R with the almighty ggplot2. The R package ggplot2 is a game changer when it comes to creating beautiful and informative data visualizations. It is an incredibly powerful tool that allows you to easily create complex graphics and customize them to your heart’s content. The package makes it simple to create stunning visualizations of your data, from simple bar plots to more complex graphics like heatmaps and scatterplots. And with ggplot2, you can be confident that your visualizations will be clear, accurate, and highly effective at communicating your message. Plus, it’s so easy to use that even a novice can create amazing graphics in just a few minutes. So why wait? Start using ggplot2 today and watch your data come to life like never before!

2. Happy Git with R

Using git and GitHub when writing reproducible data analyses with R is incredibly helpful because it allows you to easily track and manage changes to your code and data. This means that you can go back to previous versions of your analysis if needed, and you can also share your work with others in a simple and organized way. Additionally, git and GitHub make it easy to collaborate with others on data analysis projects, which can be incredibly useful when working on large and complex datasets. Overall, git and GitHub are essential tools for anyone who wants to write reproducible and collaborative data analyses with R.

3. Rmarkdown The Definitive Guide

Everything about Rmarkdown, a very handy output format for analysis/reports etc. Written by the main developers of Rmarkdown. Might be superseded by quarto now.

4. What They Forgot to Teach You About R

Quite funny book on advanced topics, is mostly about better workflows and more robust programming.

5. Efficient R Programming

This is really advanced, it’s about writing more efficient code overall. I find it very exciting right now and at some point you get to the point where this becomes important, especially when you work with large data sets.

Cornelius Hennch
Cornelius Hennch
Psychiatry resident

I’m interested in the effect of climate change on mental health and reproducible data analysis.

Related