Resample a data matrix or vector to new coordinates (e.g.
band positions) using spline or linear interpolation. This function is a
simple wrapper around approx and splinefun in
base.
Arguments
- X
numeric matrix or vector to resample (optionally a data frame that can be coerced to a numerical matrix).
- wav
a numeric vector giving the original band positions.
- new.wav
a numeric vector giving the new band positions.
- interpol
the interpolation method: 'linear' or 'spline' (default).
- ...
additional arguments to be passed to the
splinefunfunction wheninterpol = 'spline'.
Author
Antoine Stevens and Leonardo Ramirez-Lopez
