as.fdsample: Coerce to an fdsample

Description Usage Arguments Details Examples

View source: R/asfdsample.R

Description

Coerce a funsample object to a fdsample object.

Usage

1
as.fdsample(x, ..., argrange = attr(x, "arglim"), nsteps = 200)

Arguments

x

the funsample object to be converted.

...

parameters to be passed to the generator fdsample.

argrange

numeric vector of length 2, range of the argument values.

nsteps

the number of intervals the argument range is divided into.

Details

Convert a sample of functions into an fdsample by approximation in the argument values. Argument values are obtained by dividing the given interval argrange into nsteps parts.

Examples

1
2
3
4
#rather artificial example: plot sin(x), cos(x), and their mean
myfuns <- funsample(list(sin = sin, cos = cos), arglim = c(0, 2*pi))
myfdsample <- as.fdsample(myfuns, xlab ="x", ylab = "sin(x) and cos(x)")
summaryplot(myfdsample)

fdnonpar documentation built on May 2, 2019, 5:54 p.m.