interpLin: Linear interpolation function

interpLinR 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

ercrema/nimbleCarbon documentation built on Sept. 12, 2024, 7:42 p.m.