substituteParameters {symbolicQspray} | R Documentation |
Assign values to the parameters of a 'symbolicQspray'
Description
Substitutes some values to the parameters of a
symbolicQspray
polynomial.
Usage
substituteParameters(Qspray, values)
Arguments
Qspray |
a |
values |
vector of values to be substituted to the parameters; these
values must be coercible to |
Value
A qspray
object.
See Also
Use changeParameters
to apply a transformation of the
parameters. Use substituteVariables
to substitute some
values to the variables.
Examples
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
[Package symbolicQspray version 1.1.0 Index]