Description Usage Arguments Details Value Examples
Functions to get or set the exponents of a polynomial.
1 2 |
x |
a polynomial, or an object which can be coerced by |
value |
an integer vector of the same length as |
exponents
and exponents<-
get and set the "exponents"
attribute of a polynomial.
For exponents
, an integer vector of the same length as x
.
(NULL
indicates that the polynomial has default exponents, given by
seq(0L, along.with = x)
).
For exponents<-
, the updated object. (Note that the value of
exponents(x) <- value
is that of the assignment, value
, not the
return value from the left-hand side.)
1 2 3 4 5 6 7 8 9 10 11 12 | x <- 1:10
## 'x' has NULL exponents, representing the default exponents
exponents(x)
## using 'exponents<-' on an object that is not
## a polynomial coerces the object to polynomial
exponents(x) <- 9:0
is.polynomial(x)
x
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.