\Header{tfExpand}{Expand a Tframe or Tframed Object.}
\methalias{tfExpand.default}{tfExpand}
\methalias{tfExpand.tframe}{tfExpand}
\alias{tfTruncate}{tfExpand}
\methalias{tfTruncate.default}{tfExpand}
\methalias{tfTruncate.tframe}{tfExpand}
\keyword{programming}{tfExpand}
\keyword{utilities}{tfExpand}
\keyword{ts}{tfExpand}
\keyword{chron}{tfExpand}
\begin{Description}\relax
Expand a tframe or tframed object.
\end{Description}
\begin{Usage}
\begin{verbatim}
    tfExpand(x, add.start = 0, add.end = 0)
    ## Default S3 method:
    tfExpand(x, add.start = 0, add.end = 0)
    ## S3 method for class 'tframe':
    tfExpand(x, add.start = 0, add.end = 0)

    tfTruncate(x, start=NULL, end=NULL)
    ## Default S3 method:
    tfTruncate(x, start=NULL, end=NULL)
    ## S3 method for class 'tframe':
    tfTruncate(x, start=NULL, end=NULL)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] A tframe or tframed object.
\item[\code{start}] an integer indicating the position at which the new tframe is
to start.
\item[\code{end}] an integer indicating the position at which the new tframe is
to end.
\item[\code{add.start}] an integer indicating the number of periods on the
beginning.
\item[\code{add.end}] an integer indicating the number of periods on the end.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
These methods are like tfwindow but use position indicators (rather 
than dates) and work with a tframe or tframed data. Applied to a tframe
they return an adjusted tframe. Applied to a tframed object
they return an adjusted object with its adjusted tframe.They are low level
utilities for other functions.
\end{Details}
\begin{Value}
A tframe or tframed object.\end{Value}
\begin{SeeAlso}\relax
\code{\Link{tfwindow}}
\code{\Link{tframed}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
    z <- ts(rnorm(100), start=c(1982,1), frequency=12)
    Dz <- tframed(diff(z), tfTruncate(tframe(z), start=2))
    tframe(Dz)
    IDz <- tframed(cumsum(c(0, Dz)), tfExpand(tframe(Dz), add.start=1))
    tframe(IDz)
    tframe(tfTruncate(z, start=5))
\end{ExampleCode}
\end{Examples}

