Learn R Programming

ivmte (version 1.0.1)

genpolynomial: Generating polynomial functions

Description

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.

Usage

genpolynomial(vector, basis, zero = FALSE)

Arguments

vector

vector of polynomial coefficients.

basis

vector of exponents corresponding to each element of vector.

zero

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.

Value

A function in the form of the polynom package.