approximate a timeseries using the nearest neighbour
ApproxNearest.Rd
extends approx which always takes the right or left neighbour or the weighted mean between both if f>0<1
Arguments
- x
numeric vector giving the coordinates of the points to be interpolate
- y
corresponding y values
- xout
set of numeric values specifying where interpolation is to take place.
- rule
an integer (of length 1 or 2) describing how interpolation is to take place outside the interval see ?approx