R/diff.fts.R

diff.fts <- function (x, lag = 1, differences = 1, ...) 
{
    if (class(x)[1] == "fts"|class(x)[1] == "sfts"){
        x$y <- t(diff(t(x$y), lag, differences, ...))
        return(x)
    }
    else{
        stop("object is not a functional time series or a sliced functional time series")
    }
}

Try the ftsa package in your browser

Any scripts or data that you put into this service are public.

ftsa documentation built on May 29, 2024, 2:47 a.m.