Learn R Programming

depth.plot (version 0.1)

spatial.rank: Spatial Rank

Description

Used to compute the Spatial Rank of a p-variate observation with respect to a p-variate data cloud.

Usage

spatial.rank(x, data)

Arguments

x
A numeric p-variate vector whose spatial rank is to be calculated.
data
A matrix or a data.frame with each row as a p-variate observation.

Value

The spatial rank of x with respect to data.

Examples

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

Run the code above in your browser using DataLab