require(robustbase)
## Calculation of Projection depth
data(starsCYG, package = "robustbase")
depth(t(colMeans(starsCYG)), starsCYG)
#Aslo for matrices
depth(starsCYG, starsCYG)
## Projection depth applied to a large bivariate data set
x = matrix(rnorm(9999), nc = 3)
depth(x, x)Run the code above in your browser using DataLab