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

nimbleCarbon documentation built on Aug. 14, 2023, 5:08 p.m.