Learn R Programming

ivmte (version 1.0.1)

genmonomial: Generating monomials

Description

This function takes in a first vector of coefficients, and a second vector declaring which univariate polynomial basis corresponds to each element ofexponents corresponding to each element of vector.

Usage

genmonomial(vector, basis, zero = FALSE, as.function = FALSE)

Arguments

vector

numeric, a vector of coefficients in a polynomial.

basis

integer, a vector of the polynomial degrees corresponding to the coefficients in 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.

as.function

boolean, if FALSE then polynomials are returned; if TRUE then a function corresponding to the polynomial is returned.

Value

A list of monomials, in the form of the polynom package.