Learn R Programming

DepthProc (version 1.0.3)

depthMedian: Depth median

Description

Return point with maximum depth function value. If multiple points have the same value, mean average of them will be returned.

Usage

depthMedian(x, ...)

## S3 method for class 'matrix': depthMedian(x, ...)

## S3 method for class 'data.frame': depthMedian(x, ...)

## S3 method for class 'Depth': depthMedian(x)

Arguments

x
object of class Depth or matrix.
...
arguments passed to depth function (e.g method).

Examples

Run this code
# depthMedian for matrix
x = matrix(rnorm(600), nc = 3)
depthMedian(x)

# depthMedian works with object of class Depth
dp = depth(x)
depthMedian(dp)

Run the code above in your browser using DataLab