| toString.polynomial | R Documentation |
Creates text representation for a polynomial:
if digits is TRUE then as.character(.) is used
if digits is FALSE then ./. is used
if digits is numeric then as.character(round(., digits)) is used
## S3 method for class 'polynomial'
toString(
x,
digits = TRUE,
decreasing = FALSE,
variable = "x",
simplify = TRUE,
tol = 1e-09,
...
)
x |
polynomial: vector of coefficients (first is intercept) |
digits |
numeric or logical: how to convert to text (default: |
decreasing |
logical: order of the terms by increasing or decreasing powers (default: |
variable |
character: name of variable used (default: |
simplify |
logical: should the polynomial representation be simplified (default: |
tol |
numeric: tolerance (default:
|
... |
unused |
a character
p <- polynomial(c(-1,0,2)/3)
toString(p, 4)
toString(p, FALSE)
toString(p, TRUE)
toString(p, variable="z")
toString(p, decreasing=TRUE)
p <- polynomial(c(0,1,2)/3)
toString(p)
toString(p, tol=-1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.