R/L1Depth.R

Defines functions LpAve

LpAve <- function(dataX, p=1) {
  if (p > 1) {
    colMeans(apply(dataX, 2, `^`, p=p))^(1/p)
  } else if (p == 1) {
    colMeans(dataX)
  }
}

Try the MHD package in your browser

Any scripts or data that you put into this service are public.

MHD documentation built on May 29, 2024, 7:36 a.m.