knots.dierckx: Extract the knots from a dierckx object

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Extract either all or only the interior knots from an object of class dierckx.

Usage

1
2
## S3 method for class 'dierckx'
knots(Fn, interior=TRUE, ...)

Arguments

Fn

an object of class dierckx

interior

logical:

if TRUE, the first Fn[["k"]]+1 of Fn[["knots"]] are dropped, and the next Fn[["g"]] are returned.

Otherwise, the first Fn[["n"]] of Fn[["knots"]] are returned.

...

ignored

Details

The knots component of at least some dierckx objects is of length Fn[["nest"]], but only the first Fn[["n"]] of them are actually used. Moreover, the first and last Fn[["k"]]+1 of them are end knots while the remaining Fn[["g"]] are interior knots.

Value

Numeric vector. If 'interior' is TRUE, this vector has length = Fn[["g"]]. Otherwise, it has length Fn[["n"]].

Author(s)

Sundar Dorai-Raj

References

Dierckx, P. (1991) Curve and Surface Fitting with Splines, Oxford Science Publications.

See Also

curfit, concon, spline, smooth.spline

Examples

1
2
3
4
5
6
7
8
9
x <- 0:24
y <- c(1.0,1.0,1.4,1.1,1.0,1.0,4.0,9.0,13.0,
       13.4,12.8,13.1,13.0,14.0,13.0,13.5,
       10.0,2.0,3.0,2.5,2.5,2.5,3.0,4.0,3.5)

z1 <- curfit(x, y, method = "ss", s = 0, k = 3)

knots(z1)
knots(z1, interior=FALSE) # to see all knots 

DierckxSpline documentation built on May 2, 2019, 6:30 p.m.