plotBoxesByFactor: Layout of box-plots: variables by factor

Description Usage Arguments Details Author(s) Examples

View source: R/plotBoxesByFactor.R

Description

plotBoxesByFactor generates box-plots of several variable by a factor.

Usage

1
plotBoxesByFactor(xVars, groups, ncol=3, zTrans=TRUE, varwidth=FALSE)

Arguments

xVars

data-frame of metric variables.

groups

factor variable.

ncol

number of layout columnes.

zTrans

logical. xTrans=TRUE performs a z-transformation of all variables.

varwidth

logical. varwidth=TRUE makes the box width proportional to the number of observation used to generate the box for a specific factor level.

Details

This function organizes several box-plots of metric variables broken by a factor variable in to a layout. By default 3 box-plots are shown per row and the variables are standardized by the z-transformation. As the number of factor levels increases the number of plots per row should be decreased to maintain a reasonable visual resolution.

Author(s)

Michael Tiefelsdorf <tiefelsdorf@utdallas.edu>

Examples

1
2
3
varsKeep <- c("PCTWHITE","PCTBLACK","PCTASIAN","PCTHISPAN","MEDAGE","MEDVALHOME")
myData <- tractShp@data
plotBoxesByFactor(myData[,varsKeep], tractShp$CITYPERI, ncol=2, zTrans=TRUE, varwidth=FALSE)

TexMix documentation built on March 1, 2020, 5:10 p.m.