# attach the dataset `Titanic`
# get an overview over the data
# plot a mosaic
# attach the dataset `Titanic`
Titanic_1 <- Titanic
# get an overview over the data
summary(Titanic_1)
# or
str(Titanic_1)
# or
head(Titanic_1)
# print the data the console
Titanic_1
# plot a mosaic
mosaicplot(Titanic_1, main = "Survival on the Titanic")
test_object("Titanic_1")
test_or({
test_function("summary", args = "object")
},{
test_function("head", args = "x")
},{
test_function("str", args = "object")
})
test_output_contains("Titanic_1")
test_function("mosaicplot", args = "x")
success_msg("Great. This first impression shows, e.g., that survival rates are higher for individuals in higher travel classes. The next exercise considers an less aggregated dataset to model the probability of survival.")