Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

as.character.polynom

Polynomial coercion to character


Description

Produce a text representation of a polynomial object

Usage

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

Arguments

x

The polynomial object in question

variable

Character string: what variable name should be used?

decreasing

Logical: in decreasing powers or increasing powers?

...

Additional arguments (ignored as yet)

Value

A character string representation of the polynomial

Examples

p <- poly_from_zeros(-2:3)
as.character(p, "z", FALSE)
as.character(p, "z", TRUE)
parse(text = as.character(p, "z", TRUE))[[1]]

PolynomF

Polynomials in R

v2.0-3
GPL-2
Authors
Bill Venables, with contribution by Kurt Hornik and Georgi Boshnakov
Initial release
2020-02-04

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.