R/BSDA-package.R
Simpson.Rd
Data for Example 1.18
Simpson
A data frame/tibble with 100 observations on three variables
grade point average
sport played (basketball, soccer, or track)
athlete sex (male, female)
Kitchens, L. J. (2003) Basic Statistics and Data Analysis. Pacific Grove, CA: Brooks/Cole, a division of Thomson Learning.
boxplot(gpa ~ gender, data = Simpson, col = "violet")
boxplot(gpa ~ sport, data = Simpson, col = "lightgreen")
if (FALSE) {
library(ggplot2)
ggplot2::ggplot(data = Simpson, aes(x = gender, y = gpa, fill = gender)) +
geom_boxplot() +
facet_grid(.~sport) +
theme_bw()
}