hdepth: hdepth of points

Description Usage Arguments Details Value Note Author(s) See Also Examples

View source: R/bagplot.R

Description

hdepth() computes the h-depths of points.

Usage

1
hdepth(tp, data, number.of.directions=181)

Arguments

tp

two column matrix of the coordinates of points which h-depths are needed

data

two column matrix of the coordinates of the points of a data set

number.of.directions

number of directions to be checked

Details

The function hdepth computes the h-depths of the points tp relative to data set data. If data is missing tp will also be taken as data set.

Value

the h-depths of the test points

Note

Version of bagplot: 12/2012

Author(s)

Peter Wolf

See Also

bagplot

Examples

1
2
3
4
  # computation of h-depths
  data <- cbind(rnorm(40), rnorm(40)) 
  xy <- cbind(runif(50,-2,2),runif(50,-2,2))
  bagplot(data); text(xy, as.character(hdepth(xy,data)))

Example output

Loading required package: tcltk
Warning message:
no DISPLAY variable so Tk is not available 

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

Related to hdepth in aplpack...