as.funts {Rfssa} | R Documentation |
Convert Object to a funts
Description
This function allows you to convert various types of objects into a functional time series (funts
) object.
Usage
as.funts(obj, basis = NULL)
Arguments
obj |
the object to be converted. It can be an object of class |
basis |
an optional argument specifying the basis to be used for the resulting |
Value
An object of class funts
.
Note
Only objects of class fd
(functional data) and fts
(functional time series) can be converted to a funts
object. Other types will result in an error.
See Also
Examples
require(rainbow)
class(Australiasmoothfertility)
x_funts1 <- as.funts(Australiasmoothfertility)
plot(x_funts1, main = "Australians Fertility")
require(fda)
bs <- create.bspline.basis(rangeval = c(15, 49), nbasis = 13)
fd_obj <- smooth.basis(argvals = Australiasmoothfertility$x, Australiasmoothfertility$y, bs)$fd
x_funts <- as.funts(fd_obj)
plotly_funts(x_funts,
main = "Australians Fertility",
ylab = "Fertility rate",
xlab = "Age"
)
[Package Rfssa version 3.1.0 Index]