Learn R Programming

aplpack (version 1.3.0)

boxplot2D: Boxplot of projection of two dimensional data

Description

boxplot2D computes summary statistics of a one dimensional projection of a two dimensional data set and plots a sloped boxplot of the statistics into the scatterplot of the two dimensional data set.

Usage

boxplot2D(xy, add.to.plot = TRUE, box.size = 10, box.shift = 0, 
    angle = 0, angle.type = "0", tukey.style = TRUE, coef.out = 1.5, 
    coef.h.out = 3, design = "sl", na.rm=FALSE, ...)

Arguments

xy

(nx2)-matrix, two dimensional data set

add.to.plot

if TRUE the boxplot is added to the actual plot of the graphics device

box.size

height of the box (of the boxplot)

box.shift

shift of boxplot perpendicular to the projection direction

angle

direction of projection in units defined by angle.type

angle.type

"0": angle in (0,2*pi), "1": clock-like: angle.typ.0==2*pi*angle.typ.1/12, "2": degrees: angle.typ.0==2*pi*angle.typ.2/360, "3": by fraction: delta.y/delta.x

tukey.style

if TRUE outliers are defined as described in Tukey (1977)

coef.out

outliers are values that are more than coef.out*boxwidth away from the box, default: coef.out=1.5

coef.h.out

heavy outliers are values that are more than coef.h.out*boxwidth away from the box, default: coef.h.out=3

design

if sl then parallelogram else box

na.rm

if TRUE 'NA' values are removed otherwise exchanged by mean

additional graphical parameters

References

Tukey, J. Exploratory Data Analysis. Addison-Wesley, 1977.

See Also

boxplot

Examples

Run this code
# NOT RUN {
 xy<-cbind(1:100, (1:100)+rnorm(100,,5))
 par(pty="s")
 plot(xy,xlim=c(-50,150),ylim=c(-50,150))
 boxplot2D(xy,box.shift=-30,angle=3,angle.typ=1)
 boxplot2D(xy,box.shift=20,angle=1,angle.typ=1)
 boxplot2D(xy,box.shift=50,angle=5,angle.typ=1)
 par(pty="m")
# }

Run the code above in your browser using DataLab