Description Usage Arguments Author(s) References See Also Examples
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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17  Boxplot(y, ...)
## Default S3 method:
Boxplot(y, g, id=TRUE, xlab, ylab, ...)
## S3 method for class 'formula'
Boxplot(formula, data=NULL, subset, na.action=NULL,
id=TRUE, xlab, ylab, ...)
## S3 method for class 'list'
Boxplot(y, xlab="", ylab="", ...)
## S3 method for class 'data.frame'
Boxplot(y, id=TRUE, ...)
## S3 method for class 'matrix'
Boxplot(y, ...)

y 
a numeric variable for which the boxplot is to be constructed; a list of numeric variables, each element of which will be treated as a group; a numeric data frame or a numeric matrix, each of whose columns will be treated as a group. 
g 
a grouping variable, usually a factor, for constructing parallel boxplots. 
id 
a list of named elements giving one or more specifications for labels of individual points ("outliers"):

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, such as 
John Fox jfox@mcmaster.ca, with a contribution from Steve Ellison
to handle at
argument (see boxplot
).
Fox, J. and Weisberg, S. (2019) An R Companion to Applied Regression, Third Edition, Sage.
1 2 3 4 5 6 7  Boxplot(~income, data=Prestige, id=list(n=Inf)) # identify all outliers
Boxplot(income ~ type, data=Prestige)
Boxplot(income ~ type, data=Prestige, at=c(1, 3, 2))
Boxplot(k5 + k618 ~ lfp*wc, data=Mroz)
with(Prestige, Boxplot(income, id=list(labels=rownames(Prestige))))
with(Prestige, Boxplot(income, type, id=list(labels=rownames(Prestige))))
Boxplot(scale(Prestige[, 1:4]))

Loading required package: carData
[1] "general.managers" "lawyers"
[3] "physicians" "veterinarians"
[5] "osteopaths.chiropractors"
[1] "general.managers" "physicians"
[1] "general.managers" "physicians"
[1] "746" "53"
[1] "general.managers" "lawyers"
[3] "physicians" "veterinarians"
[5] "osteopaths.chiropractors"
[1] "general.managers" "physicians"
[1] "general.managers" "lawyers"
[3] "physicians" "veterinarians"
[5] "osteopaths.chiropractors"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.