Last active
October 1, 2016 13:37
-
-
Save padamson/db256750a58497c4a2c90457f7f84107 to your computer and use it in GitHub Desktop.
Create mosaic plot for Real-World Machine Learning Figure 2.12
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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