Learn R Programming

fda (version 2.1.1)

as.function.fd: Convert a functional data or functional basis object to a function

Description

Create a function to evaluate a functional data or basis object for specific argument values.

Usage

## S3 method for class 'basisfd':
as.function(x, variable='x', \dots)
## S3 method for class 'fd':
as.function(x, variable='x', \dots)
## S3 method for class 'fdSmooth':
as.function(x, variable='x', \dots)

Arguments

x
an object of class basisfd, fd, or fdSmooth.
variable
A character string giving the name to be used for the formal argument of the resulting function.
...
Not currently used.

Value

  • An R function implementing the evaluation.

Details

Create a function calling eval.basisfd(variable, x), eval.fd(variable, x) or eval.fdSmooth(variable, x).

Examples

Run this code
bspl1.1 <- create.bspline.basis(norder=1, breaks=0:1)
bspl1.1f <- as.function(bspl1.1)

Run the code above in your browser using DataLab