plot.hero_bspline {hero} | R Documentation |
Plot a hero_bspline
object
Description
Plots basis functions specified by results of bspline
.
Usage
## S3 method for class 'hero_bspline'
plot(x, nderiv = 0L, type = "l", kcol = NULL, ...)
Arguments
x |
An object of class |
nderiv |
An integer value specifying the derivative order of the B-splines. The default is 0. |
type |
character string (length 1 vector) or vector of 1-character
strings indicating the type of plot for each
column of |
kcol |
Color for vertical lines drawn at interior knots. Default is |
... |
Additional graphical parameters passed to |
See Also
Examples
x = bspline(nbasis = 10, extend = FALSE)
plot(x)
plot(x, nderiv = 1)
plot(x, kcol = "grey") # plot vertical lines at knots
# extend knots passed rangeval
x2 = bspline(nbasis = 10, extend = TRUE)
plot(x2, kcol = "grey")
# compare to plot.fd
if (requireNamespace("fda", quietly = TRUE)) {
x3 = fda::create.bspline.basis(nbasis = 10)
par(mfrow = c(2, 1))
plot(x, kcol = "grey")
title("plot.hero_bspline")
}
plot(x3)
title("plot.fd")
[Package hero version 0.6 Index]