\Header{cbind}{Combine Columns/Rows into a Matrix}
\alias{rbind}{cbind}
\alias{cbind.data.frame}{cbind}
\alias{rbind.data.frame}{cbind}
\keyword{array}{cbind}
\keyword{manip}{cbind}
\begin{Usage}
\begin{verbatim}
cbind(...)
rbind(...)
\end{verbatim}
\end{Usage}
\begin{Value}
The generic functions \texttt{cbind} and \texttt{rbind} take a sequence of
vector and/or matrix arguments and combine them as the \bold{c}olumns or
\bold{r}ows, respectively, of a matrix.

If there are several matrix arguments,
they must all have the same number of columns (or rows)
and this will be the number of columns (or rows) of the result.
If all the arguments are vectors, the number of columns (rows) in the
result is equal to the length of the longest vector.
Values in shorter arguments are recycled
to achieve this length.

When the arguments consist of a mix of matrices and vectors
the number of columns (rosw) of the result is determined by the number
of columns (rows) of the matrix arguments.  Any vectors have their
values recycled or subsetted to achieve this length.\end{Value}
\begin{Note}
The method dispatching is \emph{not} done via
\texttt{\Link{UseMethod}(..)}, but by C-internal dispatching.
Therefore, there's no need for, e.g., \texttt{rbind.default}.\end{Note}
\begin{SeeAlso}
\texttt{\Link{c}} to combine vectors or list.\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
cbind(1,1:7) # the '1' (= shorter vector) is recycled
cbind(1:7, diag(3))# vector is subset

cbind(0,rbind(1,1:3))

cbind(0, matrix(1, nrow=0, ncol=4))#> Warning (making sense)
dim(cbind(0, matrix(1, nrow=2, ncol=0)))#-> 2 x 1
\end{ExampleCode}
\end{Examples}

