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
Run R Code
About This Page
This page features live demonstrations of the R Statistics Program used for political science research.
  • To run example, click the Run button.
  • To copy example code, click the Copy button.


See More R Demos
Run R Code in Your Web Browser
# Chapter 4: Making Comparisons
library(poliscidata)  # Loads R companion package in session

# LINE CHARTS

# You first need to transform the DV.
nes$envir = as.numeric(nes$envjob_3=="Envir")
nes$envir = 100*nes$envir

plotmeansC(nes, ~envir, ~pid_3, envir~pid_3, w=~wt,
           xlab="Party Identification", 
           ylab="Percent Pro-Environment",
           main="Percentage Favoring Environment over Jobs,\n by Party Identification")
Watch & Learn
thumbnail preview
â–º
i
From David Caughlin (19:43).
 Reading Data Using the read.csv Function
thumbnail preview
â–º
i
From Mike Marin (4:19).
 t Distribution and t Scores
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