changeVariables | R Documentation |
Replaces the variables of a ratioOfQsprays
fraction of
polynomials with some qspray
polynomials. E.g. you have a fraction
of polynomials R(x, y)
and you want the fraction of polynomials
R(x^2, x+y+1)
.
## S4 method for signature 'ratioOfQsprays,list'
changeVariables(x, listOfQsprays)
x |
a |
listOfQsprays |
a list containing at least |
The ratioOfQsprays
fraction of polynomials obtained by
replacing the variables of the fraction of polynomials given in the
x
argument with the qspray
polynomials given in the
listOfQsprays
argument.
library(ratioOfQsprays)
f <- function(x, y) {
(x^2 + 5*y - 1) / (x + 1)
}
x <- qlone(1)
y <- qlone(2)
R <- f(x, y)
X <- x^2
Y <- x + y + 1
S <- changeVariables(R, list(X, Y))
S == f(X, Y) # should be TRUE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.