Description Usage Arguments Details Value Author(s) Examples
Interpolates tabulated values via Lagrange interpolation
1 | LagrangeInterpolate(.x, .n, .D)
|
.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 |
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.
The interpolated value of variable #2 corresponding to the value provided for variable #1 (.x)
William Cooper
1 | LagrangeInterpolate (3.3, 3, data.frame (1:5, 1:5+runif(5,-0.1,0.1)))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.