| interpNA {tis} | R Documentation |
Interpolate missing values in a Time Indexed Series
Description
Calls approxfun or splinefun
to interpolate missing values in a tis object.
Usage
interpNA(x, method = "constant", useTimes = F, offset = 1, rule = 2, f = 0, ...)
Arguments
x |
a |
method |
One of c("constant", "linear", "fmm", "natural",
"periodic"). Methods "constant" and "linear" call |
useTimes |
if |
offset |
if |
rule |
For methods "constant" and "linear": an integer describing
how interpolation is to take place outside the interval
[ |
f |
For |
... |
Other arguments passed along to |
Details
Depending on the method specified, a call to either
approxfun or splinefun is constructed with appropriate
arguments and executed for each column of x. In the call to
approxfun or splinefun, the time indices ti(x)
(or the decimal times returned by time(x, offset), if
useTimes is TRUE) serve as the 'x' argument and the
column values as the 'y' argument.
Value
A tis object like x with NA values filled
in by interpolated values.