.BG
.FN tsmatrix
.TL
Create Matrix with Time-Series as Columns
.CS
tsmatrix(...)
.AG ...
any number of arguments, interpreted as
time-series to form columns of the resulting matrix.  The
time window for the matrix will be the intersection of time windows for
the arguments (i.e., the maximum of the start dates and
the minimum of the end dates).  All series must have the
same periodicity.
Missing values (`NA's) are allowed.
.RT
a matrix with one column for each argument
and an attribute named `tsp' with the start date, end date, and frequency.
.PP
Note the distinction between `tsmatrix'
and the related function `cbind', which allows
vectors or matrices as arguments as well, but makes no effort to make
time parameters consistent.  Frequently, the two functions can be used
together (see example).
.SA
`cbind', `rbind'.
.EX
tsmatrix(x,lag(x),diff(x)) #x, lag\-1 of x and first diffs
cbind(tsmatrix(x,lag(x)),1) #two series, column of 1s

yx <- tsmatrix(employment,gnp,lag(gnp), ...)
lsfit(yx[,1],yx[,\-1])  # regression with x and y times aligned
.KW ts
.KW array
.WR
