Calculate the Lagrange interpolation polynomial, or list of polynomials, given
a set of (x, y) points to fit
Usage
poly_calc(x, y, tol = sqrt(.Machine$double.eps), lab = dimnames(y)[[2]])
poly_from_zeros(...)
poly_from_roots(...)
poly_from_roots(...)
poly_from_values(x, y, tol = sqrt(.Machine$double.eps), lab = dimnames(y)[[2]])
Value
An interpolation polynomial, or list of interpolating polynomials.
Arguments
x
A numeric vector of x-points at which the y-values are specified.
y
Either a numeric vector of the same length as x or a numeric
matrix with rows matching the length of x. If y is
missing (not specified) then a polynomial with zero at x is
returned.
tol
A numeric tolerance for duplicated x values.
lab
A character string vector of names for the list result when y is a matrix.
...
A list of specified zeros (for subsidiary functions)