toLatex.polynomial {exams.forge} | R Documentation |
LaTeX Representation of a Polynomial
Description
Returns a LaTeX representation of the polynomial.
Usage
## S3 method for class 'polynomial'
toLatex(
object,
digits = TRUE,
decreasing = FALSE,
variable = "x",
simplify = TRUE,
tol = 1e-09,
...
)
Arguments
object |
polynomial |
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 parameters |
Value
A character
Examples
p <- polynomial(c(-1,0,2)/3)
toLatex(p, 4)
toLatex(p, FALSE)
toLatex(p, TRUE)
toLatex(p, variable="z")
toLatex(p, decreasing=TRUE)
p <- polynomial(c(0,1,2)/3)
toLatex(p)
toLatex(p, tol=-1)
[Package exams.forge version 1.0.10 Index]