Learn Without Walls
← Back to Free Courses

R Practice Labs

Real R. In your browser. Powered by WebR.

10 hands on labs for students who’ve completed Introduction to Statistics. Write R code, click Run, see results: right in your browser. No RStudio required.

10 Labs Runs in Browser Free No Installs Self Paced
Your Progress Loading...

Progress is saved in your browser. No account needed.

Powered by WebR: R runs right here

No accounts. No downloads. No RStudio. No cloud IDE. R runs directly in your browser using WebR, a full R runtime compiled to WebAssembly. All packages, all output, all plots: everything stays right here on this page.

Before You Start

These labs are designed for students with basic R familiarity: ideally after completing Introduction to Statistics. You should know what a variable is, how to call a function, and have seen a vector before. If you’re brand new to R, start with a beginner tutorial first.

← Take Introduction to Statistics first

10
Labs
40+
Exercises
0
Installs
Free
Always
The 10 Labs

Foundations: Labs 1 to 3
Available
1

Vectors & Data Types

R’s building blocks: everything is a vector

Practice creating and manipulating numeric, character, logical, and factor vectors. Master indexing, vectorized operations, and logical subsetting.

c() vectors indexing class()
Open Lab →
Available
2

Data Frames

R’s version of a spreadsheet: and so much more

Create, explore, filter, and sort data frames. Access columns with $, subset rows with conditions, add new columns, and produce summary statistics.

data.frame() $ subset order()
Open Lab →
Available
3

dplyr: Data Wrangling

The grammar of data manipulation

Master filter(), select(), mutate(), arrange(), group_by(), and summarize(). Chain operations with the pipe |> for clean, readable analysis.

dplyr pipe group_by summarize
Open Lab →
Intermediate: Labs 4 to 7
Available
4

Functions & Control Flow

Writing reusable, intelligent R code

Write your own R functions, use if/else, for loops, and the apply family. Build a complete statistics toolkit of reusable functions.

function() if/else sapply lapply
Open Lab →
Available
5

String Manipulation

Cleaning and transforming text in R

Use base R string functions and the stringr package to clean messy data, detect patterns with regex, and extract structured info from text.

stringr gsub regex str_detect
Open Lab →
Available
6

ggplot2: Data Visualization

The grammar of graphics

Build publication quality charts with ggplot2. Bar charts, scatter plots, histograms, boxplots, and faceted figures. Plots render right in the browser.

ggplot2 geom_* aes() themes
Open Lab →
Available
7

Statistical Analysis

From data to insights: the core of R

Run t tests, correlations, and linear regression. Interpret coefficients, p values, and R². Simulate data and test statistical hypotheses.

t.test() lm() cor() summary()
Open Lab →
Advanced: Labs 8 to 10
Available
8

Tidyr & Data Import

Tidy data is happy data

Transform wide data to long and back with pivot_longer() and pivot_wider(). Use separate() and unite(). Learn what “tidy data” really means.

tidyr pivot_longer pivot_wider separate
Open Lab →
Available
9

R Markdown Style Reports

Communicating your analysis like a professional

Build formatted, professional looking reports using cat(), sprintf(), and structured output functions. Write code that tells a story.

sprintf() cat() formatting reports
Open Lab →
Available
10

Capstone: Full R Analysis

Everything together: a complete real analysis

You’re a university analyst. Analyze student outcomes data end to end: descriptive stats, visualizations, hypothesis tests, regression, and a written executive summary.

capstone regression t test report
Open Lab →

How Each Lab Works

Every lab follows the same 5 part structure so you always know what to expect.

Concept Recap

A quick review of the key R concepts you’ll practice, no new theory, just a crisp reminder.

Worked Example

A complete code example showing the concepts in action: study it before writing your own.

Guided Exercise

Starter code with blanks to fill in. Lower stakes, lots of hints to get you going.

Independent + Challenge

Two exercises where you write more on your own. The challenge pushes further.

Mini Project

A complete real world R task that ties the whole lab together.

Technical notes