Learn R Programming

rationalfun (version 0.1-1)

as.function.rationalfun: Convert object to function

Description

This function converts an object of class "rationalfun" to a function.

Usage

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

Arguments

x

an object of class "rationalfun"

not used in this function

Value

A function with one argument which could be a real or complex vector.

See Also

as.function.polynomial

Examples

Run this code
# NOT RUN {
r <- rationalfun(c(1, 1), c(3, 2, 1))
r
f <- as.function(r)
f
f(1:10)
f(1:10 + (0+2i))
# }

Run the code above in your browser using DataLab