Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

knots.fd

Extract the knots from a function basis or data object


Description

Extract either all or only the interior knots from an object of class basisfd, fd, or fdSmooth.

Usage

## S3 method for class 'fd'
knots(Fn, interior=TRUE, ...)
## S3 method for class 'fdSmooth'
knots(Fn, interior=TRUE, ...)
## S3 method for class 'basisfd'
knots(Fn, interior=TRUE, ...)

Arguments

Fn

an object of class basisfd or containing such an object

interior

logical:

if TRUE, Fn[["params"]] are returned.

Else, nord <- norder(Fn); rng <- Fn[['rangeval']]; return c(rep(rng[1], nord), Fn[["params"]], rep(rng[2], nord))

...

ignored

Details

The interior knots of a bspline basis are stored in the params component. The remaining knots are in the rangeval component, with multiplicity norder(Fn).

Value

Numeric vector. If 'interior' is TRUE, this is the params component of the bspline basis. Otherwise, params is bracketed by rep(rangeval, norder(basisfd).

Author(s)

Spencer Graves

See Also


fda

Functional Data Analysis

v5.1.9
GPL (>= 2)
Authors
J. O. Ramsay <ramsay@psych.mcgill.ca> [aut,cre], Spencer Graves <spencer.graves@effectivedefense.org> [ctb], Giles Hooker <gjh27@cornell.edu> [ctb]
Initial release
2020-12-16

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.