Usage
adjbox(x, ...)## S3 method for class 'formula':
adjbox(formula, data = NULL, \dots, subset, na.action = NULL)
## S3 method for class 'default':
adjbox(x, \dots, range = 1.5, doReflect = FALSE,
width = NULL, varwidth = FALSE,
notch = FALSE, outline = TRUE, names, plot = TRUE,
border = par("fg"), col = NULL, log = "",
pars = list(boxwex = 0.8, staplewex = 0.5, outwex = 0.5),
horizontal = FALSE, add = FALSE, at = NULL)
Arguments
formula
a formula, such as y ~ grp
, where y
is a
numeric vector of data values to be split into groups according to
the grouping variable grp
(usually a factor).
data
a data.frame (or list) from which the variables in
formula
should be taken.
subset
an optional vector specifying a subset of observations
to be used for plotting.
na.action
a function which indicates what should happen
when the data contain NA
s. The default is to ignore missing
values in either the response or the group.
x
for specifying data from which the boxplots are to be
produced. Either a numeric vector, or a single list containing such
vectors. Additional unnamed arguments specify further data
as separate vectors (each corresponding to a component boxplot
...
For the formula
method, named arguments to be passed to
the default method. For the default method, unnamed arguments are additional data
vectors (unless x
is a list when they are ignored),
and named arguments ar
range
this determines how far the plot whiskers extend out
from the box, and is simply passed as argument coef
to
adjboxStats()
. If range
is positive, the
whiskers exten doReflect
logical indicating if the MC should also be
computed on the reflected sample -x
, and be averaged,
see mc
. width
a vector giving the relative widths of the boxes making
up the plot.
varwidth
if varwidth
is TRUE
, the boxes are
drawn with widths proportional to the square-roots of the number
of observations in the groups.
notch
if notch
is TRUE
, a notch is drawn in
each side of the boxes. If the notches of two plots do not
overlap this is strong evidence that the two medians differ
(Chambers et al., 1983, p. 62).
outline
if outline
is not true, the outliers are
not drawn (as points whereas S+ uses lines).
names
group labels which will be printed under each boxplot.
boxwex
a scale factor to be applied to all boxes. When there
are only a few groups, the appearance of the plot can be improved
by making the boxes narrower.
staplewex
staple line width expansion, proportional to box
width.
outwex
outlier line width expansion, proportional to box
width.
plot
if TRUE
(the default) then a boxplot is
produced. If not, the summaries which the boxplots are based on
are returned.
border
an optional vector of colors for the outlines of the
boxplots. The values in border
are recycled if the
length of border
is less than the number of plots.
col
if col
is non-null it is assumed to contain colors
to be used to colour the bodies of the box plots. By default they
are in the background colour.
log
character indicating if x or y or both coordinates should
be plotted in log scale.
pars
a list of (potentially many) more graphical parameters,
e.g., boxwex
or outpch
; these are passed to
bxp
(if plot
is true); for details, see there. horizontal
logical indicating if the boxplots should be
horizontal; default FALSE
means vertical boxes.
add
logical, if true add boxplot to current plot.
at
numeric vector giving the locations where the boxplots should
be drawn, particularly when add = TRUE
;
defaults to 1:n
where n
is the number of boxes.