as.function.mvp | R Documentation |
Coerces a multivariate polynomial into a function
## S3 method for class 'mvp'
as.function(x, ...)
x |
Multivariate polynomial |
... |
Further arguments (currently ignored) |
Robin K. S. Hankin
p <- as.mvp("1+a^2 + a*b^2 + c")
p
f <- as.function(p)
f
f(a=1)
f(a=1,b=2)
f(a=1,b=2,c=3) # coerces to a scalar
f(a=1,b=2,c=3,lose=FALSE) # formal mvp object
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.