R: Coerce polynomial object to character

as.character.polynom {PolynomF} | R Documentation

## Coerce polynomial object to character

### Description

Coerces a `polynom` object to a printable character representation.

### Usage

    ## S3 method for class 'polynom'
    as.character(x, variable = "x", decreasing = FALSE, ...)

### Arguments

`x` | A `polynom` object
`variable` | Character string with the desired variable name.
`decreasing` | Should the powers be decreasing, or increasing as in power series form?
`...` | Not presently used

### Details

The character string may be parsed into an expression for the polynomial itself.

### Value

A character string.

### Author(s)

Bill Venables, with contributions from Kurt Hornik

### References

None

### Examples

    p <- poly.from.zeros(-2:4)
    as.character(p)
    # "48*x - 28*x^2 - 56*x^3 + 35*x^4 + 7*x^5 - 7*x^6 + x^7"

[Package PolynomF version 1.0-1 Index]