changeVariables {ratioOfQsprays} | R Documentation |
Change of variables in a 'ratioOfQsprays' fraction of polynomials
Description
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)
.
Usage
## S4 method for signature 'ratioOfQsprays,list'
changeVariables(x, listOfQsprays)
Arguments
x |
a |
listOfQsprays |
a list containing at least |
Value
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.
Examples
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
[Package ratioOfQsprays version 1.1.0 Index]