boxplotlog: Boxplotlog

Description Usage Arguments Details Value Author(s) References Examples

Description

The function boxplot plots a boxplot of the data with respect to the logarithmic transformed values of the whiskers. See also details.

Usage

1
2
3
4
boxplotlog(x, ..., range = 1.5, 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

x

data

...

further arguments for creating the list

range

this determines how far the plot "whiskers" extend from the box. If range is positive, the most extreme data point which is no more than range times the length of the box away from the box. A value of zero causes the whiskers to extend to the data extremes.

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

outline

if outline is FALSE, the outliers are not drawn

names

define the names of the attributes

plot

if plot is TRUE the boxplot is plotted in the current plot

border

character or numeric (vector) which indicates the color of the box borders

col

defines the colour

log

character, indicating if any axis should be drawn in logarithmic scale

pars

some graphical parameters can be specified

horizontal

logical parameter indicating if the boxplots should be horizontal; FALSE means vertical boxes

add

if TRUE the boxplot is added to the current plot

at

numeric vector giving the locations of the boxplots

Details

Sometimes a boxplot of the original data does not identify outliers because the boxplot assumes normal distribution. Therefore the data are logarithmically transformed and values for plotting the boxplot are calculated. After that the data are backtransformed and the boxplot is plotted with respect to the logarithmic results. Now the outliers are identified.

Value

stats

a vector of length 5, containing the extreme of the lower whisker, the lower "hinge", the median, the upper "hinge" and the extreme of the upper whisker (backtransformed)

n

the number of non-NA observations in the sample

conf

the lower and upper extremes of the "notch"

out

the values of any data points which lie beyond the extremes of the whiskers (backtransformed)

group

the group

names

the attributes

Returns a boxplot which is calculated with the log-transformed data.

Author(s)

Peter Filzmoser <P.Filzmoser@tuwien.ac.at> http://cstat.tuwien.ac.at/filz/

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

1
2
3
4
data(chorizon)
Ba=chorizon[,"Ba"]

boxplotlog((Ba),horizontal=TRUE,xlab="Ba [mg/kg]",cex.lab=1.4,pch=3,cex=1.5)

Example output

Loading required package: geoR
--------------------------------------------------------------
 Analysis of Geostatistical Data
 For an Introduction to geoR go to http://www.leg.ufpr.br/geoR
 geoR version 1.7-5.2.1 (built on 2016-05-02) is now loaded
--------------------------------------------------------------

Loading required package: sgeostat
Warning messages:
1: no DISPLAY variable so Tk is not available 
2: In rgl.init(initValue, onlyNULL) : RGL: unable to open X11 display
3: 'rgl_init' failed, running with rgl.useNULL = TRUE 
4: .onUnload failed in unloadNamespace() for 'rgl', details:
  call: fun(...)
  error: object 'rgl_quit' not found 

StatDA documentation built on March 13, 2020, 2:42 a.m.

Related to boxplotlog in StatDA...