Core-generating Function for Mosaic Plots
Core-generating function for strucplot
returning a function
producing mosaic plots.
struc_mosaic(zero_size = 0.5, zero_split = FALSE, zero_shade = TRUE, zero_gp = gpar(col = 0), panel = NULL)
zero_size |
size of the bullets used for zero-entries in the contingency table (if 0, no bullets are drawn). |
zero_split |
logical controlling whether zero cells should be
further split. If |
zero_shade |
logical controlling whether zero bullets should be shaded. |
zero_gp |
object of class |
panel |
Optional function with arguments: |
A function with arguments:
residuals |
table of residuals. |
observed |
table of observed values. |
expected |
not used by |
spacing |
object of class |
gp |
list of |
split_vertical |
vector of logicals indicating, for each dimension of the table, the split direction. |
David Meyer David.Meyer@R-project.org
Cohen, A. (1980), On the graphical display of the significant components in a two-way contingency table. Communications in Statistics—Theory and Methods, A9, 1025–1041.
Friendly, M. (1992), Graphical methods for categorical data. SAS User Group International Conference Proceedings, 17, 190–200. http://datavis.ca/papers/sugi/sugi17.pdf
Meyer, D., Zeileis, A., and Hornik, K. (2006),
The strucplot framework: Visualizing multi-way contingency tables with
vcd.
Journal of Statistical Software, 17(3), 1-48.
doi: 10.18637/jss.v017.i03 and available as
vignette("strucplot")
.
## Titanic data data("Titanic") ## mosaic plot with large zeros strucplot(Titanic, core = struc_mosaic(zero_size = 1))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.