From Data to Models with R
Learn R and Statistics,
one step at a time.
A complete university course that takes you from your first line of R code to regression, machine learning and clustering — written for students who do not have a strong background in statistics.
Four levels, one path
Each lesson tells you its level, how long it takes and what you should know before starting. Follow the levels in order, or jump to what you need.
R foundations
Install R, learn the language, manipulate data with the tidyverse, write functions, import and clean data.
Describe & explore
Frequency tables, means and spreads, graphics with ggplot2, correlation — the language of data.
How every lesson works
Clear objectives
What you will be able to do at the end, stated up front.
Intuition first
Every idea starts from a concrete problem and a picture or simulation. The maths is there, in collapsible "Going deeper" boxes.
How to read the output
Line-by-line guides to what R prints, so you can explain your results in words.
Common pitfalls
The misconceptions students (and researchers!) fall into, and how to avoid them.
Exercises in the browser
Edit and run R code on the page — no installation needed — with hints and solutions.
Modern, reproducible R
Native pipe, tidyverse, tidymodels, Quarto and project-based workflows.
Who is this for?
- University students in statistics, economics, biology, psychology, engineering and the social sciences who need R for their courses or thesis.
- Self-learners who want a structured path rather than scattered tutorials.
- Instructors looking for open material: the course can support a module of up to 9 ECTS / 72 hours. All sources are on GitHub.
No previous programming or statistics knowledge is assumed. If you can install software on your computer, you are ready.
Read Start here (10 minutes) to install R, choose an editor and learn how the interactive exercises work. Then open Lesson 1.
The whole course (except the optional deep-learning track) is also available in Italian: use the EN | IT switch in the top bar, or go directly to the Italian home page.