Learn R Programming

polynom (version 1.4-1)

Math.polynomial: Math Group Methods for Polynomials

Description

Group method for functions in the Math group.

Usage

# S3 method for polynomial
Math(x, …)

Arguments

x

an object of class "polynomial".

further arguments to be passed to or from methods, such as digits.

Value

A polynomial with transformed coefficients.

Details

Most math group functions are disallowed with polynomial arguments. The only exceptions are ceiling, floor, round, trunc, and signif which may be used to transform the coefficients accordingly.

See Also

Ops.polynomial, Summary.polynomial.

Examples

Run this code
# NOT RUN {
op <- options(digits=18)
p <- poly.from.values(1:4, (2:5)^2)
## 1 + 2.00000000000001*x + x^2
p <- round(p)
## 1 + 2*x + x^2
options(op)
# }

Run the code above in your browser using DataLab