LagrangeInterpolate: LagrangeInterpolate

Description Usage Arguments Details Value Author(s) Examples

Description

Interpolates tabulated values via Lagrange interpolation

Usage

1
LagrangeInterpolate(.x, .n, .D)

Arguments

.x

Value of variable #1 for which interpolated result is to be returned

.n

Number of points to use (order of polynomial will be .n-1). The value provided must be in the range from 2 to 10; otherwise NA is returned.

.D

Data.frame containing the two variables to use for interpolation

Details

The routine takes as input a data.frame with two variables, one to be used for interpolation of values in the second. It returns the value of the second variable corresponding to the provided value of the first variable.

Value

The interpolated value of variable #2 corresponding to the value provided for variable #1 (.x)

Author(s)

William Cooper

Examples

1
LagrangeInterpolate (3.3, 3, data.frame (1:5, 1:5+runif(5,-0.1,0.1)))

WilliamCooper/Ranadu documentation built on July 10, 2019, 12:40 a.m.