Blame | Last modification | View Log | Download | RSS feed
\name{boxplot}\title{Box Plots}\usage{boxplot(\dots, range=1.5, width, varwidth=FALSE,notch=FALSE, names, data, plot=TRUE, col=NULL,border=par("fg"))}\alias{boxplot}\arguments{\item{\dots}{the data from which the boxplots are to be produced.The data can be specified as separate vectors, each correspondingto a component boxplot, or as a single list containing such vectors.Alternatively a symbolic specification of the form\code{x ~ g} can be given, indicating the the observationsin the vector \code{x} are to be grouped according tothe levels of the factor \code{g}. In this case the argument\code{data} can be used to provide values for the variablesin the specification.\code{NA}s are allowed in the data.}\item{range}{this determines how far the plot whiskersextend out from the box.If \code{range} is positive,the whiskers extend to the most extreme data point whichis no more than \code{range} times the interquartile rangefrom the box.A value of zero causes the whiskers to extend to the data extremes.}\item{width}{a vector giving the relative widths of the boxesmaking up the plot.}\item{varwidth}{if \code{varwidth} is \code{TRUE}, the boxesare drawn with widths proportional to the square-rootsof the number of observations in the groups.}\item{notch}{if \code{notch} is \code{TRUE}, a notch is drawn in eachside of the boxes. If the notches of two plots do notoverlap then the medians are significantly different at the5 percent level.}\item{name}{group labels which while be printed undereach boxplot.}\item{plot}{if \code{plot} is \code{TRUE} (the default) thena boxplot is produced.If not, the summaries which the boxplots are based on arereturned.}\item{border}{an optional vector of colors for the outlines ofthe boxplots. The values in \code{border} are recycled ifthe length of \code{border} is less than the number of plots.}\item{col}{if \code{col} is non-null it is assumed tocontain colors to be used to col the bodies of the box plots.}\item{\dots}{graphical parameters can also be passed asarguments to \code{boxplot}.}}\value{This function is usually invoked for its side effectwhich is to produce box-and-whisker plots of the given values.However, it also returns a list with one component correspondingto each plot. The components are themselves lists with named componentsas follows:\item{stats}{a vector containing the extreme of thelower whisker, the lower hinge, the median, the upper hingeand the extreme of the upper whisker.}\item{n}{the number of observations in the sample.}\item{conf}{the lower and upper extremes of the notch.}\item{out}{the values of any data points which lie beyond theextremes of the whiskers.}}\seealso{\code{\link{boxplot.stats}} which does the computation and\code{\link{bxp}} for the plotting.}\examples{data(insects)boxplot(count~spray, data=insects, col="lightgray")}