Boxplot {car} | R Documentation |
Boxplot
is a wrapper for the standard R boxplot
function, providing point identification,
axis labels, and a formula interface for boxplots without a grouping variable.
Boxplot(y, ...) ## Default S3 method: Boxplot(y, g, labels, id.method = c("y", "identify", "none"), id.n=10, xlab, ylab, ...) ## S3 method for class 'formula' Boxplot(formula, data = NULL, subset, na.action = NULL, labels., id.method = c("y", "identify", "none"), xlab, ylab, ...)
y |
a numeric variable for which the boxplot is to be constructed. |
g |
a grouping variable, usually a factor, for constructing parallel boxplots. |
labels, labels. |
point labels; if not specified, |
id.method |
if |
id.n |
up to |
xlab, ylab |
text labels for the horizontal and vertical axes; if missing, |
formula |
a ‘model’ formula, of the form |
data, subset, na.action |
as for statistical modeling functions (see, e.g., |
... |
further arguments to be passed to |
John Fox jfox@mcmaster.ca
Fox, J. and Weisberg, S. (2011) An R Companion to Applied Regression, Second Edition, Sage.
Boxplot(~income, data=Prestige, id.n=Inf) # identify all outliers Boxplot(income ~ type, data=Prestige) with(Prestige, Boxplot(income, labels=rownames(Prestige))) with(Prestige, Boxplot(income, type, labels=rownames(Prestige)))