Apply a function of multiple arguments to each cell of a ragged array, that is to each
(non-empty) group of values given by a unique combination of the
levels of certain factors. It is a hybrid of tapply
and mapply
.
mosaicSelectDialog()mosaicPermDialog(tablename,allow.collapsing=TRUE, start.active=NULL,
displayPermCommand=TRUE, extendedOptions=TRUE)
margin.table.structable(x,margin)
setMosaicPalette(palettename,reverse=FALSE)
brewer.pal.ext(n,name,reverse=FALSE)
An object for which a mosaic plot or an assoc plot can be displayed: table or ftable or structable
Allows to omit dimensions from the table
boolean vector controlling active variables (variables to be used in plot)
controls if command producing plot is displayed in the dialog window
allows finer control of result of using the dialog
name of one of the palettes defined in package RColorBrewer
structable to collapse
dimensions to keep
number of colors in the ColorBrewer palette
name of ColorBrewer palette
reverse color order in palette
mosaicPermDialog
either returns the function call producing the last displayed plot
as string or the command producing the permuted table underlying th plot or the
permuted table itself.
mosaicSelectDialog
does not return usable values. It just
creates a dialog box to select the object to be plotted as mosaic or assoc plot.
margin.table.structable
collapes a structable to a lower dimensional
structable bh keeping the indicated dimensions and summing the values over
all dimensions not indicated. For a twodimensional table this would
compute row sums or column sums.
brewer.pal.ext
is a modified version of brewer.pal
in package RColorBrewer
. It allows palettes
with one or 2 colors (which RColorBrewer does not).
For documentatation see RColorBrewer
.
the functions link{mosaic}
and
assoc
# NOT RUN {
data(Titanic)
myTitanic <- structable(Titanic)
mosaicPermDialog(myTitanic)
# }
Run the code above in your browser using DataLab