Learn R Programming

fdars (version 0.3.3)

median: Compute Functional Median

Description

Returns the curve with maximum depth using the specified depth method.

Usage

median(
  fdataobj,
  method = c("FM", "mode", "RP", "RT", "BD", "MBD", "FSD", "KFSD", "RPD"),
  ...
)

Value

The curve (as fdata object) with maximum depth.

Arguments

fdataobj

An object of class 'fdata'.

method

Depth method to use. One of "FM", "mode", "RP", "RT", "BD", "MBD", "FSD", "KFSD", or "RPD". Default is "FM".

...

Additional arguments passed to the depth function.

Examples

Run this code
fd <- fdata(matrix(rnorm(100), 10, 10))
med <- median(fd)
med_mode <- median(fd, method = "mode")

Run the code above in your browser using DataLab