\Header{tfdiff}{Time Series Differencing}
\alias{diff.tframed}{tfdiff}
\methalias{tfdiff.default}{tfdiff}
\methalias{tfdiff.tframe}{tfdiff}
\keyword{internal}{tfdiff}
\begin{Description}\relax
Difference a tframed object.
\end{Description}
\begin{Usage}
\begin{verbatim}
    tfdiff(x, lag=1, differences=1)
    ## Default S3 method:
    tfdiff(x,lag=1, differences=1)
    ## S3 method for class 'tframe':
    tfdiff(x,lag=1, differences=1)
    ## S3 method for class 'tframed':
    diff(x,lag=1, differences=1, ...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] a tframed object.
\item[\code{lag}] difference calculated relative to lag periods previous.
\item[\code{differences}] order of differencing.
\item[\code{...}] arguments to be passed to other methods.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
A time framed object is created by differencing the number of times
indicated by differences at a lagged number of periods indicated by lag. The
default is take the difference from data one period previous.
\end{Details}
\begin{SeeAlso}\relax
\code{\Link{diff}},
\code{\Link{lag}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
    z <- ts(rnorm(100), start=c(1982,1), frequency=12)
    tfstart(z)
    tfperiods(z)
    z <- tfdiff(z)
    tfstart(z)
    tfperiods(z)
\end{ExampleCode}
\end{Examples}

