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

Description Usage Arguments Value Note See Also Examples

View source: R/mosaicupanddown.R

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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.

Note

Special thanks go to Richard Heiberger who invested quite some time in testing uncharted territory and made valuable suggestions for improving this function

See Also

the functions link{mosaic} and assoc

Examples

1
2
3
4
5
6
## Not run: 
data(Titanic)
myTitanic <- structable(Titanic)
mosaicPermDialog(myTitanic)

## End(Not run)

ENmisc documentation built on May 2, 2019, 5:52 a.m.