NOW AVAILABLE: Essentials of Poltical Analysis 7e | R Companion 4e | SPSS 7e | Stata 5e | Excel 1e 🎵
NOW AVAILABLE: Essentials 7e | R Companion 4e | SPSS 7e | Stata 5e | Excel 1e 🎵
NOW AVAILABLE: Essentials 7e | More Textbooks 🎵

Run R Code Online: Live Demos for Political Analysis

R demos banner image
About This Page
Run live R code demos built for political science research methods. These examples help students learn how to apply R functions to real political data.
To see these demonstrations, you don't need to have R installed on your machine. Just select a demonstration, click the run button, and see what happens. You can modify and re-run the demo code to learn how it works or apply it to new/different problems.

The demonstrations below are adapted from my book with Philip Pollock, An R Companion to Political Analysis, 2nd Edition (CQ Press/Sage, 2017) .

Introduction to R Environment:

Exploring Companion Datasets:

Descriptive Statistics:

Transforming Variables:

Making Comparisons:

Making Controlled Comparisons:

Correlation and Linear Regression: