Mosaic Plot
Plots (extended) mosaic displays via mosaic
.
The last response variable is highlighted.
A high-dimensional contingency table is calculated via structable
from the given dataset.
Flat contingency table splits predictors horizontally and optional responses vertically.
mosaicPlot( dataset = cs.in.dataset(), preds = cs.in.predictors(), resps = cs.in.responses(), return.results = FALSE, ... )
dataset |
[ |
preds |
[ |
resps |
[ |
return.results |
[ |
... |
[ANY] |
Logical [TRUE
] invisibly and outputs to Cornerstone or,
if return.results = TRUE
, list
of
resulting data.frame
objects:
long.contingency |
Contingency table in long format. |
# Draw mosaic plot from 'titanic' data: mosaicPlot(titanic, c("Class", "Age", "Sex", "Survived")) res = mosaicPlot(titanic, c("Class", "Age"), c("Sex", "Survived"), return.results = TRUE) print(res)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.