mosaicplot(X, main = NULL, xlab = NULL, ylab = NULL, sort = NULL, off = NULL, dir = NULL, color = F)
1:length(dim(X))
(the default).
"v"
=vertical and
"h"
=horizontal) for
each level of the mosaic, one direction for each dimension of the
contingency table. The default consists of alternating directions,
beginning with a vertical split.
Based on S code by
Jay Emerson, Yale University, February 1998
http://www.stat.yale.edu/~emerson/JCGS/index.html
Hartigan, J.A., and Kleiner, B. (1984)
A mosaic of television ratings.
The American Statistician,
38, 32-35.
Friendly, M. (1994) Mosaic displays for multi-way contingency tables.
Journal of the American Statistical Association,
89, 190-200.
Emerson, J. W. (1998)
Mosaic displays in S-PLUS: a general implementation and a case study.
.uk
Statistical Computing and Graphics Newsletter,
9(1), 17-23.
caith1 <- as.matrix(caith) names(dimnames(caith1)) <- c("eyes", "hair") mosaicplot(caith1, color = T) # use xtabs in R House <- crosstabs(Freq ~ Type + Infl + Cont + Sat, housing) mosaicplot(House, color = T)