An R Companion to Political Analysis, Second Edition features four datasets: the General Social Survey, the American National Election Study, a custom dataset on U.S., and a custom dataset on countries in the world.

All four of these datasets (GSS, NES, States, and World) are bundled in the R Package the authors developed for the R Companion.  This R Package is called “poliscidata” 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 poliscidata package for the R Companion book is very easy.  You’ll be ready to start analyzing real political science data in just a few minutes.

To install the poliscidata 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 poliscidata package, enter the following command in your R console to load the package.  (You can also load the poliscidata package by selecting the “Load package…” option under the Packages menu.)



That’s it.  You’ve downloaded and loaded all four datasets and a suite of custom functions for political analysis.  Enjoy!