Learn R from your first cat() call to a small project, with vectors, lists and functions checked as you go.
8 lessons, 16 exercises. Runs R 4.6.
Not started
Hello, output
Print text with cat() and print(), add comments, and see how R runs a script from top to bottom.
Values and variables
Store values in variables with <-, meet R's basic types, and follow good naming habits.
Reading input and arithmetic
Read lines from standard input with readLines(), turn text into numbers, and calculate with R's operators.
Making decisions
Run different code depending on a condition with if, else if and else, using comparison and logical operators.
Loops
Repeat work with for and while loops, and control them with break and next.
Functions
Package code into reusable functions with parameters, default values and return values, and see how scope keeps variables apart.
Vectors and lists
Store many values in vectors, pick and filter them with indexes, look values up by name, and group mixed data in lists.
Strings and a small project
Measure, slice, change and split text with R's string functions, then combine everything into a small gradebook program.
Your progress is saved in this browser. Sign in to keep it on every device.