Learn R Programming

PolynomF (version 0.94)

summary.polynom: Summary, coefficient and prediction methos for polynomial objects.

Description

These function implement methods for summary, coef, and predict generic funcitons for polynom and polylist objects.

Usage

# S3 method for polynom
summary(object, …)
# S3 method for polynom
summary(object, …)
# S3 method for summary.polynom
print(x, …)
# S3 method for polynom
coef(object, …)
# S3 method for polylist
coef(object, …)
# S3 method for polynom
predict(object, newdata, …)
# S3 method for polylist
predict(object, newdata, …)

Arguments

object

An object of class polynom or polylist.

x

A summary.polynom object to be printed.

newdata

A numeric or polynom object.

Not currently used.

Value

For summary.polynom and summary.polylist a list of numeric vectors.

For predict.polynom and predict.polylist an object of the same class as the input argument: either numeric or polynom.

For coef.polynom and coef.polylist a numeric vector or matrix, or a list of numeric vectors.

Details

The summary method for polynom objects provides information on the zeros, stationary points and points of inflexion for the object. For polylist objects this information is provided for each polynomial in the list. The result is a list.

References

None.

Examples

Run this code
# NOT RUN {
x <- polynom()
L <- polylist(1, 1-x)
for(j in 2:10)
  L[[j+1]] <- (2*j - 1 - x)*L[[j]] - (j-1)^2*L[[j-1]]

summary(L[[5]])
predict(L[[5]], x-1)
L[[5]](x-1)

coef(L)

# }

Run the code above in your browser using DataLab