substituteParameters | R Documentation |
Substitutes some values to the parameters of a
symbolicQspray
polynomial.
substituteParameters(Qspray, values)
Qspray |
a |
values |
vector of values to be substituted to the parameters; these
values must be coercible to |
A qspray
object.
Use changeParameters
to apply a transformation of the
parameters. Use substituteVariables
to substitute some
values to the variables.
library(symbolicQspray)
f <- function(a1, a2, X, Y) {
(a1 + 2)*X^2*Y + (a2/(a1^2+a2))*X*Y
}
Qspray <- f(qlone(1), qlone(2), Qlone(1), Qlone(2))
a <- c(2, "2/3")
( qspray <- substituteParameters(Qspray, values = a) )
a <- gmp::as.bigq(a)
qspray == f(a[1], a[2], qlone(1), qlone(2)) ## should be TRUE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.