Automobile dealers classified according to type dealership and service rendered to customers
Data for Example 2.22
Dealers
A data frame/tibble with 122 observations on two variables
a factor with levels Honda
, Toyota
, Mazda
,
Ford
, Dodge
, and Saturn
a factor with levels Replaces unnecessarily
and Follows manufacturer guidelines
Kitchens, L. J. (2003) Basic Statistics and Data Analysis. Pacific Grove, CA: Brooks/Cole, a division of Thomson Learning.
xtabs(~type + service, data = Dealers) T1 <- xtabs(~type + service, data = Dealers) T1 addmargins(T1) pt <- prop.table(T1, margin = 1) pt barplot(t(pt), col = c("red", "skyblue"), legend = colnames(T1)) rm(T1, pt)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.