Learn R Programming

StatDA (version 1.7.11)

rg.boxplot: Plot a Boxplot

Description

Plot a single horizontal boxplot, the default is a Tukey boxplot.

Usage

rg.boxplot(xx, xlab = deparse(substitute(xx)), log = FALSE, ifbw = FALSE,
wend = 0.05, xlim = NULL, main = " ", colr = 5, ...)

Value

No return value, creates a plot.

Arguments

xx

data

xlab

label for the x-axis

log

if TRUE, a log-scaled plot and a logtransformation of the data

ifbw

if TRUE, a IDEAS style box-and-whisker plot is produced

wend

defines the end of the whisker, default is 5% and 95% quantile

xlim

setting xlim results in outliers not being plotted as the x-axis is shortened.

main

main title of the plot

colr

the box is infilled with a yellow ochre; if no colour is required set colr=0

...

further graphical parameters for the plot

Details

As the x-axis is shortend by setting xlim, however, the statistics used to define the boxplot, or box-and-whisker plot, are still based on the total data set. To plot a truncated data set create a subset first, or use the x[x<some.value] construct in the call.

References

C. Reimann, P. Filzmoser, R.G. Garrett, and R. Dutter: Statistical Data Analysis Explained. Applied Environmental Statistics with R. John Wiley and Sons, Chichester, 2008.

Examples

Run this code
data(chorizon)
Ba=chorizon[,"Ba"]
rg.boxplot(Ba,ifbw=TRUE,colr=0,xlab="Ba [mg/kg]",cex.lab=1.2)

Run the code above in your browser using DataLab