approxTime(x, xout, ...)
approxTime1(x, xout, rule = 1)
approxTime1
) of
independend values specifying where interpolation has to be done.approx
.approxTime
returns a matrix resp. data frame of the same structure as
x
containing data which interpolate the given data with respect
to xout
.
approxTime1
is a performance optimized special version with less options
than the original approx
function. It returns an interpolated vector.odeModel
to get input values at a specified time xout
. The version
approxTime1
is less flexible (only one single value for xout and only linear
interpolation) but has increased performance.
Both functions are faster if x is a matrix instead of a data frame.approxfun
inputs <-data.frame(time = 1:10, y1 = rnorm(10), y2 = rnorm(10, mean = 50))
input <-approxTime(inputs, c(2.5, 3), rule = 2)
Run the code above in your browser using DataLab