Usage
BoxPlot(x=NULL, data=mydata, n.cat=getOption("n.cat"),
Rmd=NULL, fill=getOption("fill.bar"),
stroke=getOption("stroke.bar"),
bg=getOption("bg"),
grid=getOption("grid"),
box=getOption("box"),
cex.axis=0.75, axes="gray30",
xlab=NULL, main=NULL, sub=NULL, digits.d=NULL,
rotate.x=0, rotate.y=0, offset=0.5,
horiz=TRUE, add.points=FALSE,
quiet=getOption("quiet"),
width=4.5, height=4.5, pdf=FALSE,
do.plot=TRUE, fun.call=NULL, …)
bx(…)
Arguments
x
Variable(s) to analyze. Can be a single numerical variable,
either within a data frame or as a vector in the user's workspace,
or multiple variables in a data frame such as designated with the
c
function, or an entire data frame. If not specified,
then defaults to all numerical variables in the specified data
frame, mydata
by default. data
Optional data frame that contains the variable(s) of interest,
default is mydata
.
n.cat
For the analysis of multiple variables, such as a data frame,
specifies the largest number of unique values of variable of a numeric
data type for which the variable will be analyzed as a categorical.
Rmd
File name for the file of R markdown instructions to be written,
if specified.
fill
Interior color of the box. Turn off with fill="off"
.
This and the following colors can also be changed globally, individually
and as
a color theme, with the lessR
global
function.
The lessR
function showColors
provides examples of all
R named colors. stroke
Color of any points that designate outliers. By default this
is the same color as the box.
bg
Color of the plot background. Turn off with bg="off"
.
grid
Color of the grid lines. Turn off with grid="off"
.
box
Color of border around the plot background, the box, that encloses
the plot. Turn off with box="off"
.
cex.axis
Scale magnification factor, which by defaults displays the axis
values to be smaller than the axis labels. Provides the functionality of, and
can be replaced by, the standard R cex.axis.
axes
Color of the font used to label the axis values.
xlab
Label for the value axis, which defaults to the variable's name.
sub
Sub-title of graph, below xlab.
digits.d
Number of decimal digits displayed in the listing of the summary
statistics.
rotate.x
Degrees that the x
-axis values are rotated, usually to
accommodate longer values, typically used in conjunction with offset
.
rotate.y
Degrees that the y
-axis values are rotated.
offset
The amount of spacing between the axis values and the axis. Default
is 0.5. Larger values such as 1.0 are used to create space for the label when
longer axis value names are rotated.
horiz
Orientation of the boxplot. Set FALSE
for vertical.
add.points
If TRUE
, then place a dot plot (i.e., stripchart) over the
box plot.
quiet
If set to TRUE
, no text output. Can change system default with
global
function. width
Width of the plot window in inches, defaults to 4.5.
height
Height of the plot window in inches, defaults to 4.5.
pdf
If TRUE
, graphics to be redirected to a pdf file.
do.plot
If TRUE
, the default, then generate the plot.
fun.call
Function call. Used with knitr
to pass the function call when
obtained from the abbreviated function call bx
.
…
Other parameter values for graphics as defined processed
by boxplot
and bxp
such as whiskcol
for
the whisker color, etc. and par
, including ylim
to set
the limits of the value axis, lwd
for the line width, cex.lab
for the size of the label, color.main
for the title, color.lab
,
sub
, color.sub
, srt
to rotate the axis value labels,
and color.ticks
to specify the color of the tick marks.