interpLin {nimbleCarbon} | R Documentation |
Linear interpolation function
Description
A nimbleFunction
emulating BUGS/JAGS's interp.lin.
Usage
interpLin(z, x, y)
Arguments
z |
value where the interpolation take place |
x |
numeric vector giving the coordinates of the points to be interpolated. |
y |
numeric vector giving the coordinates of the points to be interpolated. |
Value
interpolated value
Examples
data(intcal20)
interpLin(4500,intcal20$CalBP,intcal20$C14Age)
# equivalent to:
approx(x=intcal20$CalBP,y=intcal20$C14Age,xout=4500)$y
[Package nimbleCarbon version 0.2.5 Index]