Learn By Example · Beginner to Advanced

Learn R Programming

A clear, example-first guide to R. Every topic has its own page with plain-English explanations, runnable code shown next to its actual output, practical tips, common mistakes to avoid, and at least one advanced example. Start at the top and work down, or jump straight to what you need.

Start Learning →
How this guide works: each topic below opens its own dedicated page. Every page follows the same format — explanation, code, output, tips, and an advanced example — and has Previous/Next links at the bottom so you can work through everything in order without coming back here each time.
Getting Started
2 topics

The absolute basics — install R, understand data types, and write your first lines of code.

Data Structures
5 topics

The building blocks of every R program: vectors, lists, matrices, data frames, and factors.

Control Flow
5 topics

Make decisions and repeat actions: if/else, switch, and every loop type R offers.

Functions
2 topics

Package up reusable logic, and replace repetitive loops with the apply family.

Import & Export
2 topics

Get real data in and out of R using CSV and Excel files.

Base Graphics
7 topics

R's built-in, dependency-free plotting system — fast exploratory charts.

ggplot2 Graphics
3 topics

The layered grammar-of-graphics system used for polished, professional charts.

Statistical Analysis for Research
1 topic

Advanced, research-focused walkthroughs using realistic datasets — full descriptive analysis, reporting, and more to come.

R Package Library
1 topic

A guided directory of the most widely used R packages — what each one does, how it's structured, and how to start using it.