boxplot {base} | R Documentation |
Produce box-and-whisker plot(s) of the given (grouped) values.
boxplot(x, ...)
x |
an R object. |
... |
methods may have additional arguments. |
This is a generic function. It currently has a default method
(boxplot.default
) and a formula interface
(boxplot.formula
).
See the help for boxplot.default
.
boxplot.default
,
boxplot.formula
.
## boxplot on a formula: data(InsectSprays) boxplot(count ~ spray, data = InsectSprays, col = "lightgray") ## boxplot on a matrix: mat <- cbind(Uni05 = (1:100)/21, Norm = rnorm(100), T5 = rt(100, df = 5), Gam2 = rgamma(100, shape = 2)) boxplot(data.frame(mat), main = "boxplot(data.frame(mat), main = ...)")