\Header{t}{Matrix Transpose}
\methalias{t.data.frame}{t}
\methalias{t.default}{t}
\keyword{array}{t}
\begin{Description}\relax
Given a matrix or \code{\Link{data.frame}} \code{x},
\code{t} returns the transpose (matrix or data.frame) of \code{x}.\end{Description}
\begin{Usage}
\begin{verbatim}
t(x)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] a matrix or data frame.
\end{ldescription}
\end{Arguments}
\begin{SeeAlso}\relax
\code{\Link{aperm}} for permuting the dimensions of arrays.\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
a <- matrix(1:30, 5,6)
ta <- t(a) ##-- i.e.,  a[i, j] == ta[j, i] for all i,j :
for(j in seq(ncol(a)))
  if(! a[, j] == ta[j, ]) stop("wrong transpose")
\end{ExampleCode}
\end{Examples}

