Learn R Programming

jack (version 5.2.0)

as.function.exactmvp: Exact multivariate polynomial as function

Description

Coerces an exact multivariate polynomial into a function.

Usage

# S3 method for exactmvp
as.function(x, ...)

Value

A function having the same variables as the polynomial.

Arguments

x

object of class exactmvp; the functions returned by Jack_julia can return such objects

...

ignored

Examples

Run this code
# library(jack)
if(JuliaConnectoR::juliaSetupOk()){
  julia <- Jack_julia()
  ( pol <- julia$JackPol(m = 2, lambda = c(3, 1), alpha = "3/2") )
  f <- as.function(pol)
  f(2, "3/7")
  # the evaluation is performed by (R)yacas and complex numbers are
  # allowed; the imaginary unit is denoted by `I`
  f("2 + 2*I", "1/4")
  JuliaConnectoR::stopJulia()
}

Run the code above in your browser using DataLab