| Line 1... |
Line 1... |
| 1 |
% File src/library/graphics/man/boxplot.Rd
|
1 |
% File src/library/graphics/man/boxplot.Rd
|
| 2 |
% Part of the R package, https://www.R-project.org
|
2 |
% Part of the R package, https://www.R-project.org
|
| 3 |
% Copyright 1995-2019 R Core Team
|
3 |
% Copyright 1995-2026 R Core Team
|
| 4 |
% Distributed under GPL 2 or later
|
4 |
% Distributed under GPL 2 or later
|
| 5 |
|
5 |
|
| 6 |
\name{boxplot}
|
6 |
\name{boxplot}
|
| 7 |
\alias{boxplot}
|
7 |
\alias{boxplot}
|
| 8 |
\alias{boxplot.default}
|
8 |
\alias{boxplot.default}
|
| Line 19... |
Line 19... |
| 19 |
ylab = mklab(y_var =!horizontal),
|
19 |
ylab = mklab(y_var =!horizontal),
|
| 20 |
add = FALSE, ann = !add, horizontal = FALSE,
|
20 |
add = FALSE, ann = !add, horizontal = FALSE,
|
| 21 |
drop = FALSE, sep = ".", lex.order = FALSE)
|
21 |
drop = FALSE, sep = ".", lex.order = FALSE)
|
| 22 |
|
22 |
|
| 23 |
\method{boxplot}{default}(x, \dots, range = 1.5, width = NULL, varwidth = FALSE,
|
23 |
\method{boxplot}{default}(x, \dots, range = 1.5, width = NULL, varwidth = FALSE,
|
| 24 |
notch = FALSE, outline = TRUE, names, plot = TRUE,
|
24 |
notch = FALSE, warnN = TRUE, outline = TRUE, names, plot = TRUE,
|
| 25 |
border = par("fg"), col = "lightgray", log = "",
|
25 |
border = par("fg"), col = "lightgray", log = "",
|
| 26 |
pars = list(boxwex = 0.8, staplewex = 0.5, outwex = 0.5),
|
26 |
pars = list(boxwex = 0.8, staplewex = 0.5, outwex = 0.5),
|
| 27 |
ann = !add, horizontal = FALSE, add = FALSE, at = NULL)
|
27 |
ann = !add, horizontal = FALSE, add = FALSE, at = NULL)
|
| 28 |
}
|
28 |
}
|
| 29 |
\arguments{
|
29 |
\arguments{
|
| Line 72... |
Line 72... |
| 72 |
\item{notch}{if \code{notch} is \code{TRUE}, a notch is drawn in
|
72 |
\item{notch}{if \code{notch} is \code{TRUE}, a notch is drawn in
|
| 73 |
each side of the boxes. If the notches of two plots do not
|
73 |
each side of the boxes. If the notches of two plots do not
|
| 74 |
overlap this is \sQuote{strong evidence} that the two medians differ
|
74 |
overlap this is \sQuote{strong evidence} that the two medians differ
|
| 75 |
(Chambers \abbr{et al.}, 1983, p.\sspace{}62). See \code{\link{boxplot.stats}}
|
75 |
(Chambers \abbr{et al.}, 1983, p.\sspace{}62). See \code{\link{boxplot.stats}}
|
| 76 |
for the calculations used.}
|
76 |
for the calculations used.}
|
| - |
|
77 |
\item{warnN}{logical. When \code{notch = TRUE}, indicating if a
|
| - |
|
78 |
\code{\link{warning}} should be signalled when some notch gets
|
| - |
|
79 |
outside the hinges, i.e., the box.}
|
| 77 |
\item{outline}{if \code{outline} is not true, the outliers are
|
80 |
\item{outline}{if \code{outline} is not true, the outliers are
|
| 78 |
not drawn (as points whereas S+ uses lines).}% the argument name is most ugly but S+ compatible
|
81 |
not drawn (as points whereas S+ uses lines).}% the argument name is most ugly but S+ compatible
|
| 79 |
\item{names}{group labels which will be printed under each boxplot.
|
82 |
\item{names}{group labels which will be printed under each boxplot.
|
| 80 |
Can be a character vector or an \link{expression} (see
|
83 |
Can be a character vector or an \link{expression} (see
|
| 81 |
\link{plotmath}).}
|
84 |
\link{plotmath}).}
|
| Line 147... |
Line 150... |
| 147 |
sets).
|
150 |
sets).
|
| 148 |
}
|
151 |
}
|
| 149 |
\examples{
|
152 |
\examples{
|
| 150 |
## boxplot on a formula:
|
153 |
## boxplot on a formula:
|
| 151 |
boxplot(count ~ spray, data = InsectSprays, col = "lightgray")
|
154 |
boxplot(count ~ spray, data = InsectSprays, col = "lightgray")
|
| 152 |
# *add* notches (somewhat funny here <--> warning "notches .. outside hinges"):
|
155 |
# *add* notches and do *not* warn about "notches .. outside hinges":
|
| 153 |
boxplot(count ~ spray, data = InsectSprays,
|
156 |
boxplot(count ~ spray, data = InsectSprays,
|
| 154 |
notch = TRUE, add = TRUE, col = "blue")
|
157 |
notch = TRUE, warnN = FALSE, add = TRUE, col = "blue")
|
| 155 |
|
158 |
|
| 156 |
boxplot(decrease ~ treatment, data = OrchardSprays, col = "bisque",
|
159 |
boxplot(decrease ~ treatment, data = OrchardSprays, col = "bisque",
|
| 157 |
log = "y")
|
160 |
log = "y")
|
| 158 |
## horizontal=TRUE, switching y <--> x :
|
161 |
## horizontal=TRUE, switching y <--> x :
|
| 159 |
boxplot(decrease ~ treatment, data = OrchardSprays, col = "bisque",
|
162 |
boxplot(decrease ~ treatment, data = OrchardSprays, col = "bisque",
|