Skip to content

Instantly share code, notes, and snippets.

@padamson
Last active October 1, 2016 13:37
Create mosaic plot for Real-World Machine Learning Figure 2.12
library(vcd)
mosaic(
~ Sex + Survived,
data = titanic,
main = "Mosaic plot for Titanic data: Gender vs. survival",
shade = TRUE,
split_vertical = TRUE,
labeling_args = list(
set_varnames = c(
Survived = "Survived?")
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment