Learn R Programming

ENmisc (version 1.2-7)

mosaicPermDialog: Visual interface to create an restructure mosaic and assoc plots

Description

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.

Usage

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)

Arguments

tablename

An object for which a mosaic plot or an assoc plot can be displayed: table or ftable or structable

allow.collapsing

Allows to omit dimensions from the table

start.active

boolean vector controlling active variables (variables to be used in plot)

displayPermCommand

controls if command producing plot is displayed in the dialog window

extendedOptions

allows finer control of result of using the dialog

palettename

name of one of the palettes defined in package RColorBrewer

x

structable to collapse

margin

dimensions to keep

n

number of colors in the ColorBrewer palette

name

name of ColorBrewer palette

reverse

reverse color order in palette

Value

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.

See Also

the functions link{mosaic} and assoc

Examples

Run this code
# NOT RUN {
data(Titanic)
myTitanic <- structable(Titanic)
mosaicPermDialog(myTitanic)
# }

Run the code above in your browser using DataLab