Day 2 · Friday 24 April 2026

Day 1 in one breath.

Four episodes, one through four. Here is the through-line before we pick up where we left off.

Spacebar or arrow keys to advance.
Episode 1

Switch from clicks to code.

The case for R is not that it is prettier. It is that the next person who opens your analysis can see exactly what you did, including the future version of you.

SPSS Analyze > Compare Means > Independent-Samples T Test > ... R t.test(spending ~ origin, data = visitors)
Episode 2

Set up a real working environment.

Project, script, console, data. Four panes, one folder, one file you can re-run from scratch.

workshop/ ├── workshop.Rproj ├── script.R └── data/ └── aruba_visitors.csv
Episode 3

Transform data without leaving the keyboard.

Six verbs do most of the work. You learned all six yesterday. They chain through the pipe.

visitors |> filter(year >= 2019) |> select(origin, quarter, avg_spending_usd) |> mutate(spending_eur = avg_spending_usd * 0.92) |> group_by(origin) |> summarise(mean_spend = mean(spending_eur)) |> arrange(desc(mean_spend))
Episode 4

Visualize with a grammar, not a gallery.

Every chart is three things: data, mappings, and a geometry. Change the geom and you change the chart. The rest stays.

ggplot(visitors, aes(x = origin, y = avg_spending_usd)) + geom_boxplot(fill = "#44759e") + labs(title = "Average spending by origin", x = NULL, y = "USD per visitor") + theme_minimal()
Where we are heading today

From script to reproducible report.

Everything you did yesterday becomes one document that rebuilds itself when the data changes. By the end of the day, you will have a report you could publish.

StatisticsSame tests you ran in SPSS, one function call each.
ReportingR Markdown: prose, code, and output in one file.
Open labYour own data, your own question, with help at your elbow.
The capstoneA live-API report: data pulled from the internet, rendered as an interactive HTML page.
Ground rules for today

If you fall behind, say so.

Yesterday a few of you told us that when you got stuck, you stayed stuck. We fixed that today. Raise a hand. Flag Esther. Flag me. We will catch you before the next exercise, not after.

The cheat sheet in front of you is yours. Write on it. It was made for today.