Learn R Programming

PolynomF (version 0.94)

change.origin: Shift oritin

Description

These small convenience functions shift polynomials by relocating the origin to a new position. The primary function is generic and active methods are provided for polynom and polylist objects.

Usage

# S3 method for default
change.origin(p, o, …)
# S3 method for polynom
change.origin(p, o, …)
# S3 method for polylist
change.origin(p, o, …)

Arguments

p

A polynim or polylist object.

o

The value of the original variable to become the new origin, that is the zero value in the shifted variable.

Not used

Value

A polynom or polylist object with the origin shifted to 0.

Details

The function change.origin.default is a trap for unimplemeted methods.

References

None

Examples

Run this code
# NOT RUN {
x <- polynom()
p <- 1 - 2*x + x^2
change.origin(p, 1)
## x^2
# }

Run the code above in your browser using DataLab