NOW AVAILABLE: Essentials of Poltical Analysis 7e | R Companion 4e | SPSS 7e | Stata 5e | Excel 1e 🎵
NOW AVAILABLE: Essentials 7e | R Companion 4e | SPSS 7e | Stata 5e | Excel 1e 🎵
NOW AVAILABLE: Essentials 7e | More Textbooks 🎵

Run R Code Example Online

#  Chapter 4: Making Comparisons
library(poliscidata)   # Loads R companion package in session

# CROSS-TABULATIONS AND MOSAIC PLOTS
# this example applies some labels to mosiac plot

cat("Cross Tabulation:\n")
xtp(nes, envjob_3, pid_3, wt, 
    ylab="Environ vs. Jobs", 
    xlab="Party Identification", 
    main="Environmental Opinions, by Party Identification")