An R Companion to Political Analysis, 3rd Edition features four datasets: data from an experiment, the American National Election Study, a custom dataset on America’s 50 states, and a custom dataset on countries around the world.
All four of these datasets (debate, nes, states, and world) are bundled in the R Package the authors developed for the R Companion. This R Package is called “RCPA3” and it’s available on the Comprehensive R Archive Network (CRAN).
First, you’ll need to install the R Program on your machine. (See the R Project web site to download it for free). Once you’re installed the R Program, downloading and installing the RCPA3 package for the R Companion to Political Analysis, 3rd Edition is easy. You’ll be ready to start analyzing real political science data in just a few minutes.
To install the RCPA3 package, enter the following command in you R Console. (You can also download an R package by selecting the “Install package(s)…” option under the Packages menu.) R should prompt you to select a server from which to download the package.
After you’ve installed the RCPA3 package, enter the following command in your R console to load the package. (You can also load the RCPA3 package by selecting the “Load package…” option under the Packages menu.)
If either of these commands don’t work, see Section I.5 of the R Companion on Troubleshooting Installation Problem. This Section will help you resolve the most common problems.
That’s it. You’ve downloaded and loaded all four datasets and a suite of custom functions for political analysis. Enjoy!