| Gallup {BSDA} | R Documentation |
Data for Exercise 2.76
Gallup
A data frame with 4 observations on the following 16 variables.
Gender Female MaleCrime1No.Crime1No.Opinion1Education College Grade School High SchoolCrime2No.Crime2No.Opinion2Age18-24 25-29 30-49 50-olderCrime3No.Crime3No.Opinion3Religion Catholic ProtestantCrime4No.Crime4No.Opinion4Kitchens, L. J. (2003) Basic Statistics and Data Analysis. Duxbury
INFO <- c(43,52,5,42,53,5,44,51,5,30,67,3,45,50,5,58,33,9,27,67,6,26,70,4,45,
52,3,54,39,7,49,47,4,39,55,6)
INFOmat <- matrix(INFO,nrow=12,byrow=TRUE)
INFOmat
rownames(INFOmat) <- c("National","Gender: Male","Gender: Female",
"Education: College","Education: High School","Education: Grade School",
"Age: 18-24", "Age: 25-29", "Age: 30-49", "Age: 50-older", "Religion: Protestant",
"Religion: Catholic")
colnames(INFOmat) <- c("Criminal", "Not.Criminal", "No.Opinion")
INFOmat
barplot(t(INFOmat[2:3,]),beside=TRUE,legend=TRUE,names=c("Male","Female"),
ylab="Percent of Population Opining")
barplot((INFOmat[2:3,]),beside=TRUE,legend=TRUE,ylab="Percent of Population Opining" )
remove(INFO,INFOmat)