Learn R Programming

nimbleCarbon (version 0.2.6)

interpLin: Linear interpolation function

Description

A nimbleFunction emulating BUGS/JAGS's interp.lin.

Usage

interpLin(z, x, y)

Value

interpolated value

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.

Examples

Run this code
data(intcal20)
interpLin(4500,intcal20$CalBP,intcal20$C14Age)
# equivalent to:
approx(x=intcal20$CalBP,y=intcal20$C14Age,xout=4500)$y

Run the code above in your browser using DataLab