Undergrad | R Documentation |
Data for Exercise 1.15
Undergrad
A data frame/tibble with 100 observations on six variables
character variable with values Female
and Male
college major
college year group classification
grade point average
Scholastic Assessment Test score
number of courses dropped
Kitchens, L. J. (2003) Basic Statistics and Data Analysis. Pacific Grove, CA: Brooks/Cole, a division of Thomson Learning.
stripchart(gpa ~ class, data = Undergrad, method = "stack",
col = c("blue","red","green","lightblue"),
pch = 19, main = "GPA versus Class")
stripchart(gpa ~ gender, data = Undergrad, method = "stack",
col = c("red", "blue"), pch = 19,
main = "GPA versus Gender")
stripchart(sat ~ drops, data = Undergrad, method = "stack",
col = c("blue", "red", "green", "lightblue"),
pch = 19, main = "SAT versus Drops")
stripchart(drops ~ gender, data = Undergrad, method = "stack",
col = c("red", "blue"), pch = 19, main = "Drops versus Gender")
## Not run:
library(ggplot2)
ggplot2::ggplot(data = Undergrad, aes(x = sat, y = drops, fill = factor(drops))) +
facet_grid(drops ~.) +
geom_dotplot() +
guides(fill = FALSE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.