Learn R Programming

DepthProc (version 2.1.5)

fncDepth: Basic function for functional depths

Description

Calculates depth functions.

Usage

fncDepth(u, X = NULL, method = "MBD", byrow = NULL, ...)

# S3 method for matrix fncDepth(u, X = NULL, method = "MBD", byrow = NULL, ...)

# S3 method for zoo fncDepth(u, X = NULL, method = "MBD", byrow = NULL, ...)

Arguments

u

data

X

reference set. If null u will be used as reference.

method

depth method - "MBD" (default), or "FM" (Frainman-Muniz depth)

byrow

logical or character.

additional arguments passed to fncDepthFM.

Examples

Run this code
# NOT RUN {
x <- matrix(rnorm(60), ncol = 20)
fncDepth(x, method = "FM", dep1d = "Mahalanobis")
fncDepth(x, byrow = FALSE)

# zoo and xts
library(xts)
data(sample_matrix)
sample.xts <- as.xts(sample_matrix, descr = "my new xts object")
fncDepth(sample.xts)

# }

Run the code above in your browser using DataLab