boxplot.n {gplots}R Documentation

Produce a Boxplot Annotated with the Number of Observations

Description

This funcntion uses boxplot to produce a boxplot which is then annotated with the number of observations in each group.

Usage

boxplot.n(..., top=FALSE, shrink=1, textcolor=NULL)

Arguments

... parameters passed to boxplot.
top logical indicating whether the number of observations should be added to the top or the bottom of the plotting region. Defaults to FALSE.
shrink value to shrink character size (cex) when annotating.
textcolor text color.

Author(s)

Gregory R. Warnes warnes@bst.rochester.edu

See Also

boxplot, text

Examples

data(state)

# n's at bottom
boxplot.n( state.area ~ state.region)

# n's at top
boxplot.n( state.area ~ state.region, top=TRUE)

# small red text
boxplot.n( state.area ~ state.region, shrink=0.8, textcolor="red") 

[Package gplots version 2.6.0 Index]