genericDistanceWeightedInterpolation: A parameterizable distance-weighted interpolation function.

View source: R/interpolations.R

genericDistanceWeightedInterpolationR Documentation

A parameterizable distance-weighted interpolation function.

Description

Does not strictly adhere to the guidelines in interpolations, but can be used by getDistanceWeightedInterpolation to produce a function that does.

Usage

genericDistanceWeightedInterpolation(dates.in, y.in, dates.out,
  inv.dist.fun = function(a, b) {     1/((a - b)^2) })

Arguments

dates.in

A numeric vector desribing the dates for each of the values in y.in. Dates are represented as the number of seconds since 1970.

y.in

A vector of values (typically fluxes or concentrations) to interpolate among.

dates.out

A numeric vector of dates for which the corresponding output values are to be produced. Dates are represented as the number of seconds since 1970.

inv.dist.fun

A function to calculate an inverse distance metric. Should be vectorized such that one of a or b may be a vector when the other is a scalar.


USGS-R/loadflex documentation built on July 26, 2023, 9:54 p.m.