Learn R: A Hands-On Mini-Course

R is a free, open-source language built for working with data. It’s how a lot of statistics, analytics, and reproducible research actually gets done — at universities, in clinical trials, in finance, in sports analytics, everywhere. If you can get comfortable with the basics, you can do real work with it within a weekend.

This course is short, opinionated, and built around runnable examples. Every lesson ends with exercises (with hidden solutions) so you can practice as you go. You don’t need a math background. You don’t need a programming background. You just need to be willing to try things.

What you’ll be able to do by the end

By the end of the course you’ll be able to:

  • Read a CSV (or download one from the web) into R
  • Clean and reshape it with the tidyverse (dplyr, tidyr)
  • Make a clean, readable plot with ggplot2
  • Run basic statistics — means, t-tests, linear regression — and actually interpret what they say
  • Wrap the whole thing in an R Markdown report that someone else can rerun

The capstone lesson walks through a full mini-project: load a built-in dataset, explore it, model it, and write up the results.

The lessons

Lesson 1

Introduction to R

What R is, how to install it, the RStudio tour, your first script, and how to install packages.

~15 min
Lesson 2

Basic Operations

Variables, data types, vectors, comparisons, control flow, and writing your first function.

~25 min
Lesson 3

Data Manipulation

Read data, then reshape it with the tidyverse: filter, select, mutate, group_by, summarise, and the pipe.

~30 min
Lesson 4

Data Visualization

The grammar of graphics with ggplot2: geoms, aesthetics, facets, themes, and saving plots.

~30 min
Lesson 5

Statistics with R

Descriptive stats, t-tests, correlation, and linear regression — with diagnostics and predictions.

~30 min
Lesson 6

Reproducible Reports

R Markdown: write code and prose together, knit to HTML or PDF, and share something a colleague can rerun.

~20 min
Lesson 7

Capstone Project

Put it all together: explore a real dataset, model it, and write up a short report — start to finish.

~45 min

What you’ll need

  • A computer running macOS, Windows, or Linux.
  • R installed (free).
  • RStudio Desktop installed (also free) — this is the IDE we’ll use.
  • About 2–3 hours total if you do the lessons end-to-end. You can also dip in and out.

Lesson 1 walks you through the install if you haven’t done it.

How to use this course

Each lesson page has runnable code blocks. The recommended workflow is:

  1. Read a section.
  2. Open RStudio and type the example yourself (don’t copy-paste — muscle memory matters).
  3. Try the exercises at the end of each section. Solutions are hidden behind a “Show solution” toggle so you can take a real swing first.
💡 Tip: pick a project early

You’ll learn 5x faster if you have a real question you want to answer. Even something silly — “are NBA teams shooting more 3s than they used to?” — gives every concept a place to land. Pick one before you finish Lesson 2.

Questions or feedback?

If something is unclear, broken, or could be better, email me at or open an issue on GitHub. I genuinely want to make this better.

Feel free to contact me: