Learn R Programming

polynom (version 1.4-1)

polylist: Lists of Polynomials

Description

Create and manipulate lists of polynomials.

Usage

polylist(…)
as.polylist(x)
is.polylist(x)

Arguments

R objects, polynomials or capable of coercion to polynomials.

x

an R object.

Details

polylist takes a list of arguments, tries to convert each into a polynomial (see polynomial), and sets the class of the list to "polylist".

as.polylist tries to coerce its arguments to a polylist, and will do so for arguments which are polynomials or lists thereof.

is.polylist tests whether its argument is a polylist.

This class has several useful methods, such as taking derivatives (deriv) and antiderivatives (integral), printing and plotting, subscripting, computing sums and products of the elements, and methods for c, rep, and unique.

Examples

Run this code
# NOT RUN {
## Calculate orthogonal polynomials
pl <- poly.orth(rep(1:4, 1:4), 3)
pl
plot(pl)
deriv(pl)
integral(pl)
sum(pl)
prod(pl)
unique(rep(pl, 3)[c(8, 12)])
# }

Run the code above in your browser using DataLab