boxplot(gpa ~ rating, data = Ratings, xlab = "Student rating of instructor",
ylab = "Student GPA")
if (FALSE) {
library(ggplot2)
ggplot2::ggplot(data = Ratings, aes(x = rating, y = gpa, fill = rating)) +
geom_boxplot() +
theme_bw() +
theme(legend.position = "none") +
labs(x = "Student rating of instructor", y = "Student GPA")
}
Run the code above in your browser using DataLab