The course
R Programming
Learn the core of R, the language statisticians built for working with data. You install R, then learn its syntax, types, vectors, lists, data frames and functions on one small community-garden harvest log, so every idea builds on the last.
Ready to learnYour path through the ideas
Inside the course
Install your tools, choose your setup and verify a local run.
02Introduction and Setup5 lessons
R is a language and environment for statistical computing, data analysis and graphics. Packages extend its built-in tools. See where R fits next to Python, install R and an editor, write and run a first script, add packages from CRAN, and pin a project's package versions with renv so it runs the same anywhere.
03Basic Syntax5 lessons
Syntax is the grammar of R expressions: assigning values, combining operations, selecting branches and repeating work. Name values with the assignment arrow, compute on whole vectors with R's operators, chain steps with the native pipe, make decisions with if and ifelse(), and repeat work with for and while loops.
04Data Types4 lessons
A data type describes the kind of elements stored in an R value and how operations handle them, including missing values. Meet R's basic types: doubles, integers and complex numbers, character text, and logical values with NA for the unknown. Then learn the coercion ladder R climbs when types mix, and how to convert on purpose.
05Data Structures5 lessons
R data structures organize values as vectors, lists, arrays, categories or rectangular tables. Store the harvest log in each of R's core structures: vectors with 1-based indexing and recycling, lists for mixed items, matrices and arrays for grids, factors for categories, and data frames, tibbles and data.table for tables.
06Functions4 lessons
A function is a reusable computation with arguments and a result. Its enclosing environment influences how it resolves names. Package code as functions with arguments and defaults, learn where R looks up a name, solve self-similar problems with recursion, and replace loops with lapply, sapply, vapply, apply and tapply.