TITLE(approxfun @@ Linearly Interpolating Functions)
USAGE(
approxfun(x, y, method="linear", rule=1)
)
ALIAS(approxfun)
ARGUMENTS(
ARG(x,y @@ vectors giving the coordinates of the points to be interpolated.
Alternatively a single plotting structure can be specified.)
ARG(xout @@ an optional set of values specifying where
interpolation is to take place.)
ARG(method @@ this specifies the interpolation method to be used.
Currently this is ignored and linear interpolation
is always used.)
ARG(rule @@ an integer describing how interpolation is to take
place outside the interval
LANG([min(x),max(x)]).
If LANG(rule) is LANG(1) then LANG(NA)s
are returned for such points and if it is LANG(2),
the value at the closest data extreme is used.)
)
VALUE(
A function which will perform linear interpolation of the
given data points.  For a given set of LANG(x)
values this function will return the corresponding interpolated
values.  This is often more useful than
LANG(approx).
)
SEEALSO(
LANG(LINK(approx)), LANG(LINK(spline)), LANG(LINK(splinefun)).
)
EXAMPLES(
x <- 1:10
y <- rnorm(10)
f <- approxfun(x, y)
curve(f(x), 0, 10)
)
