Learn R Programming

depth.plot (version 0.1)

spatial.depth: Spatial Depth

Description

spatial.depth is used to find the spatial depth of one or more p-variate observation(s) in a data cloud of numerous p-variate observations.

Usage

spatial.depth(x, data)

Arguments

x
A matrix or a data.frame of objects (numerical vector as one object) whose depth is to be found; each row consists a p-variate observation.
data
A matrix or a data.frame of objects which acts as the data cloud. Each row consists of a p-variate observation.

Value

Numerical vector of depths, one for each row in x; or one depth value if x is numerical.

Examples

Run this code
u<-matrix(rnorm(90,0,1),ncol=3)
u0<-matrix(runif(9,0,1),ncol=3)
spatial.depth(u0,u)

Run the code above in your browser using DataLab