boxplot2D: Boxplot of projection of two dimensional data

Description Usage Arguments Note Author(s) References See Also Examples

View source: R/boxplot2D.R

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

1
2
3
    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

Note

version 08/2003

Author(s)

Peter Wolf

References

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

See Also

boxplot

Examples

1
2
3
4
5
6
7
 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")

Example output

Loading required package: tcltk
Warning message:
no DISPLAY variable so Tk is not available 
Warning messages:
1: In d.xy.mm.s/(d.xy.mm.s %*% d.xy.mm.s)^0.5 :
  Recycling array of length 1 in vector-array arithmetic is deprecated.
  Use c() or as.vector() instead.

2: In d.xy.s.mm/(d.xy.s.mm %*% d.xy.0.s) :
  Recycling array of length 1 in vector-array arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning messages:
1: In d.xy.mm.s/(d.xy.mm.s %*% d.xy.mm.s)^0.5 :
  Recycling array of length 1 in vector-array arithmetic is deprecated.
  Use c() or as.vector() instead.

2: In d.xy.s.mm/(d.xy.s.mm %*% d.xy.0.s) :
  Recycling array of length 1 in vector-array arithmetic is deprecated.
  Use c() or as.vector() instead.

Warning messages:
1: In d.xy.mm.s/(d.xy.mm.s %*% d.xy.mm.s)^0.5 :
  Recycling array of length 1 in vector-array arithmetic is deprecated.
  Use c() or as.vector() instead.

2: In d.xy.s.mm/(d.xy.s.mm %*% d.xy.0.s) :
  Recycling array of length 1 in vector-array arithmetic is deprecated.
  Use c() or as.vector() instead.

aplpack documentation built on Sept. 30, 2021, 5:08 p.m.

Related to boxplot2D in aplpack...