approx
function to do linear
extrapolation.
approx
in R does not support extrapolation at
all, and it is buggy in S-Plus 6.
approxExtrap(x, y, xout, method = "linear", n = 50, rule = 2, f = 0, ties = "ordered", na.rm = FALSE)
TRUE
to remove
NA
s in
x
and
y
before proceeding
Duplicates in
x
(and corresponding
y
elements) are removed
before using
approx
.
xout
Frank Harrell
approxExtrap(1:3,1:3,xout=c(0,4))