\Header{ts.union}{Bind Two or More Time Series}
\alias{cbind.ts}{ts.union}
\alias{ts.intersect}{ts.union}
\keyword{ts}{ts.union}
\begin{Description}\relax
Bind time series which have a common frequency. \code{ts.union} pads with
\code{NA}s to the total time coverage, \code{ts.intersect} restricts to the
time covered by all the series.\end{Description}
\begin{Usage}
\begin{verbatim}
ts.intersect(..., dframe = FALSE)
ts.union(..., dframe = FALSE, union = TRUE)
cbind.ts(..., dframe = FALSE, union = TRUE)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{...}] two or more univariate or multivariate time series, or
objects which can coerced to time series.
\item[\code{dframe}] logical; if \code{TRUE} return the result as a data
frame.
\item[\code{union}] logical; if \code{TRUE}, act as \code{ts.union} or
\code{ts.intersect}.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
As a special case, \code{...} can contain vectors or matrices of
the same length as the combined time series of the time series
present, as well as those of a single row.\end{Details}
\begin{Value}
A time series object if \code{dframe} is \code{FALSE}, otherwise
a data frame.\end{Value}
\begin{Author}\relax
B. D. Ripley\end{Author}
\begin{SeeAlso}\relax
\code{\Link{cbind}} for the generic.\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
data(UKLungDeaths)
ts.union(mdeaths, fdeaths)
cbind(mdeaths, fdeaths) # same as the previous line
ts.intersect(window(mdeaths, 1976), window(fdeaths, 1974, 1978))
data(BJsales)
sales1 <- ts.union(BJsales, lead = BJsales.lead)
ts.intersect(sales1, lead3 = lag(BJsales.lead, -3))
\end{ExampleCode}
\end{Examples}

