# attach the package `AER`
# load the `CollegeDistance` data set
# get an overview over the data set
# generate a histogram of `distance`
# attach the package `AER`
library(AER)
# load the `CollegeDistance` data set
data("CollegeDistance")
# get an overview over the data set
summary(CollegeDistance)
# or
str(CollegeDistance)
# or
head(CollegeDistance)
# generate a histogram of `distance`
hist(CollegeDistance$distance, main = "Distance to College", xlab = "Distance in 10 Miles")
test_function("data")
test_or({
test_function("summary", args = "object")
},{
test_function("head", args = "x")
},{
test_function("str", args = "object")
})
test_function("hist", args = "x")
success_msg("Great. The historgam shows that the majority of the surveyed lived close to a college when they were in high school.")