Previous: Examples Up: Examples Next: Density Plots: A Histogram

Descriptive Plots: Box-plots

39#39
Using the sample turnout data set included with Zelig, the following commands will produce the graph above.
> library(Zelig)                             # Loads the Zelig package.
> data (turnout)                             # Loads the sample data.
> boxplot(income ~ educate,                  # Creates a boxplot with income
+  data = turnout, col = "grey", pch = ".",  #  as a function of education.  
+  main = "Income as a Function of Years of Education", 
+  xlab = "Education in Years", ylab = "Income in \$10,000s")



Gary King 2011-11-29