as.funts | R Documentation |
This function allows you to convert various types of objects into a functional time series (funts
) object.
as.funts(obj, basis = NULL)
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 |
An object of class funts
.
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.
funts
, create.bspline.basis
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"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.