INTL7007 — Interactive R Tutorials

Data Analytics and Presentation for International Policy Professionals

Everything here runs inside your browser. There is nothing to install, no account to make, and nothing you can break. Each tutorial is self-contained — open it, work through it, close it.

If a page seems frozen when you first open it, give it a few seconds. R itself is downloading.

Week 2 — R Basics & The Weighted Dice

Your first hour in R. Arithmetic and objects, vectors, functions and their arguments, writing a function of your own, and running a simulation ten thousand times — ending with a pair of dice you have quietly weighted.

Adapted from Grolemund, Hands-On Programming with R, ch. 1–3.

Week 3 — Working With an LLM, Part I: Prompt It

Twenty minutes on the one skill that makes AI genuinely useful for code. You will load a 229,444-row dataset and estimate a treatment effect, having been taught neither — and find out why how you ask decides whether you get an answer or a fabrication.

Uses Gerber, Green & Larimer (2008) on social pressure and voter turnout.

Week 6 — Warming up: Quarto

A quick check on last week’s pair-programming task. Take apart a .qmd file, fix a broken header, find the one code chunk that actually runs, and predict what the rendered page will look like.

Reviews Pair Programming 2: Quarto in R.

Week 10 — ggplot2

Pair-programming activity.

Based on Wickham, Çetinkaya-Rundel & Grolemund, R for Data Science (2e), ch. 1.


Trouble with a page? Try a hard reload (Shift-click the reload button). If that fails, any recent Chrome, Firefox, Edge or Safari will work — including on a Chromebook.