This function takes in a first vector of coefficients, and a second vector declaring which univariate polynomial basis corresponds to each element of the first vector. Then it generates a polynomial function.
genpolynomial(vector, basis, zero = FALSE)vector of polynomial coefficients.
vector of exponents corresponding to each element of
vector.
logical, if FALSE then vector does not
include an element for the constant term. The vector
basis will need to be adjusted to account for this in
order to generate the correct polynomial and monomials.
A function in the form of the polynom
package.