boxplot.matrix {sfsmisc}R Documentation

Draw a Boxplot for each Column (Row) of a Matrix

Description

Interpreting the columns (or rows) of a matrix as different groups, draw a boxplot for each.

Usage

boxplot.matrix(x, use.cols = TRUE, ...)

Arguments

x a numeric matrix.
use.cols logical indicating if columns (by default) or rows (use.cols=FALSE) should be plotted.
... Further arguments to boxplot.

Value

A list as for boxplot.

Note

This function is really superfluous nowadays, since boxplot(data.frame(x), ...) is sufficient.

Author(s)

Martin Maechler, 1995

See Also

boxplot.default which already works with data.frames; boxplot.formula, plot.factor which work with (the more general concept) of a grouping factor.

Examples

## Very similar to the example in ?boxplot
mat <- cbind(Uni05 = (1:100)/21, Norm = rnorm(100),
             T5 = rt(100, df = 5), Gam2 = rgamma(100, shape = 2))
boxplot.matrix(mat, main = "boxplot.matrix(...., main = ...)",
               notch = TRUE, col = 1:4)

[Package sfsmisc version 1.0-11 Index]