predict.rationalfun: Evaluate a rational function

Description Usage Arguments Value See Also Examples

Description

Evaluate a rational function at a real or complex vector.

Usage

1
2
## S3 method for class 'rationalfun'
predict(object, newdata, ...)

Arguments

object

an object of class "rationalfun"

newdata

a vector at which evaluation is requested.

...

not used in this function Both real and complex vectors are accepted.

Value

A vector of evaluated results.

See Also

predict.polynomial

Examples

1
2
r <- rationalfun(c(1, 1), c(3, 2, 1))
predict(r, 1:10)

Example output

Loading required package: polynom
 [1] 0.33333333 0.27272727 0.22222222 0.18518519 0.15789474 0.13725490
 [7] 0.12121212 0.10843373 0.09803922 0.08943089

rationalfun documentation built on May 2, 2019, 10:59 a.m.