R/kde2dQuantile.R

Defines functions kde2dQuantile

Documented in kde2dQuantile

kde2dQuantile <- function(d, X, Y, probs = .05, ...) {
  xInd <- sapply(X, function(x) whichClosest(d$x, x))
  yInd <- sapply(Y, function(x) whichClosest(d$y, x))
  zValues <- d$z[cbind(xInd, yInd)]
  quantile(zValues, probs=probs, ...)
}

Try the rmngb package in your browser

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

rmngb documentation built on May 29, 2017, 9:22 p.m.