Learn R Programming

aplpack (version 1.3.3)

hdepth: hdepth of points

Description

hdepth() computes the h-depths of points.

Usage

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

Value

the h-depths of the test points

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.

See Also

bagplot

Examples

Run this code
# NOT RUN {
  # 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)))
# }

Run the code above in your browser using DataLab