R/warp.sample.R

Defines functions warp.sample

## actual warping of the sample intensities for continuous data.
warp.sample <- function(samp, w, mode) {
  if (mode == "backward") {
    apply(samp, 1, function(x) ##interpol(w, x))
      approx(x, NULL, w)$y)
  } else {
    apply(samp, 1, function(x) {
      approx(w, x, xout = 1:length(x))$y
    })
  }
}

Try the ptw package in your browser

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

ptw documentation built on Jan. 19, 2022, 5:07 p.m.