FIND DATA: By Author | Journal | Sites   ANALYZE DATA: Help with R | SPSS | Stata | Excel   WHAT'S NEW? US Politics | Int'l Relations | Law & Courts
   FIND DATA: By Author | Journal | Sites   WHAT'S NEW? US Politics | IR | Law & Courts
The Seventh Edition of The Essentials of Political Analysis is now available! More info. | Read Introduction
Run R Code Examples Online
About This Page
This page features live demonstrations of the R Statistics Program used for political science research. I created these demos to help my students learn to use R to analyze political science data. It helps students to see simple demonstrations of R functions applied to political science data.
Run R Code in Your Web Browser
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:

Watch & Learn
Run R Demo
i
Explore contents of a dataset (the 2016 NES) and variable in dataset..
 Explore NES Dataset Demo
Run R Demo
i
Create an ordinal level variable with equal-size groups from interval-level variable..
 Collapsing Variable into Roughly Equal-Sized Groups Demo.
MORE VIDEOS: See Video Channels for more political science videos!
LEARN HOW: Watch Lecture Videos for Essentials of Political Analysis, Video Tutorials for R, Stata, SPSS, and Excel