Track your progress. Sign in, or start with Your First R Session
New to R
Command of base R: data types, vectors and data frames, control flow, and writing your own functions with correct scope. Finish it and you can read and write idiomatic base R with confidence.
Curriculum structure
01Syntax, types and vectors6 lessons02Lists, data frames and tibbles6 lessons03Subsetting, control flow and functions6 lessons04Importing and exporting real data6 lessons05Strings, dates and regular expressions5 lessons06Iteration: the apply family and purrr5 lessons07Defensive code and debugging4 lessons08Reproducible workflow and the 2026 toolchain5 lessons
Full curriculum
01Syntax, types and vectorsRead and write everyday R, and understand how it stores data.6 lessons, 6 free
01.01Your First R SessionGet comfortable running code, storing results in objects, and reading errors.Free01.02Atomic Vectors and Data TypesHow R stores many values in one vector, and the types they can be.Free01.03Operators, Recycling, and CoercionCompute with whole vectors at once, even when lengths or types differ.Free01.04Missing and Special ValuesHow missing values spread through your results, and how to handle them honestly.Free01.05Install and Load PackagesAdd and switch on the extra tools that base R does not ship with.Free01.06QuizCheck what stuck before you move on.Free
02Lists, data frames and tibblesHold and inspect any rectangular or nested data.6 lessons, 6 free
02.01Lists and Nested DataHold mixed, nested data in one object, and reach any piece of it.Free02.02Data Frames and TibblesStore data as a table of typed columns, and what a tibble adds.Free02.03Inspecting Data StructureRead the type, size and structure of any object R hands you.Free02.04Matrices and ArraysHold a grid of same-type numbers, then reduce it by row or column.Free02.05Type Conversion in PracticeChange what type your data is, and fix a column that imported wrong.Free02.06QuizCheck what stuck before you move on.Free
03Subsetting, control flow and functionsMove from snippets to programs you can reuse.6 lessons, 6 free
03.01Subsetting and ReplacementPull out and overwrite exactly the values you want from any object.Free03.02Control Flow in RMake your code decide between paths and repeat work without copy-pasting.Free03.03Writing Functions in RWrap repeated work into a named function you can reuse anywhere.Free03.04Arguments, Defaults and the PipeMake functions flexible to call, and chain steps into readable code.Free03.05Environments and ScopeWhere R looks up a name, and why functions cannot disturb your workspace.Free03.06QuizCheck what stuck before you move on.Free
04Importing and exporting real dataLoad and save the data formats you will actually meet.6 lessons, 6 free
04.01Reading CSV and Delimited FilesGet real data files into R with every column the right type.Free04.02Reading Excel and Other FormatsHow to read Excel workbooks and SPSS, Stata and SAS files into R.Free04.03JSON and Web DataHow to bring data into R from a web API and a web page.Free04.04Databases and Big FilesQuery data in a database, and read files too big to load.Free04.05Saving and Exporting DataWrite your results back out, and choose the right format for each reader.Free04.06QuizCheck what stuck before you move on.Free
05Strings, dates and regular expressionsClean messy real-world text and timestamps.5 lessons, 5 free
05.01Strings with stringrClean and standardize messy text so it's ready to analyze.Free05.02Regular Expressions in RMatch the exact pieces of text you want, then extract or fix them.Free05.03Dates and Times in RTurn date text into real dates, calculate with them, and handle time zones.Free05.04Factors with forcatsPut categories in a meaningful order so counts and charts read right.Free05.05QuizCheck what stuck before you move on.Free
06Iteration: the apply family and purrrReplace fragile loops with clear, repeatable iteration.5 lessons, 5 free
06.01Why Vectorization Beats LoopsWhy operating on a whole vector at once beats looping element by element.Free06.02The apply FamilyRun your own function over each piece of a list or matrix.Free06.03The purrr map FamilyRun a function across each item and get a consistent result every time.Free06.04Resilient and Nested IterationKeep going when some items fail, and work group by group.Free06.05QuizCheck what stuck before you move on.Free
07Defensive code and debuggingWrite code that fails loudly and is quick to fix.4 lessons, 4 free
07.01Errors, Warnings and MessagesSignal problems clearly so users know exactly what to fix.Free07.02tryCatch and Input ValidationRecover from errors instead of crashing, and catch bad inputs early.Free07.03Debugging Tools in RFind where your code broke, inspect the real values, and fix it.Free07.04QuizCheck what stuck before you move on.Free
08Reproducible workflow and the 2026 toolchainSet up a project you can rerun in a year, with modern tools.5 lessons, 5 free
08.01RStudio Projects and hereOrganize a project so its file paths work on any computer.Free08.02Reproducibility with renv and gitKeep your project running the same months from now, and track every change.Free08.03The Modern R Toolchain (2026)The newer tools that handle bigger data, web APIs and AI from R.Free08.04Capstone: A Reproducible AnalysisRun a project end to end: import, tidy, analyze and report, reproducibly.Free08.05QuizCheck what stuck before you move on.Free