\Header{print.matrix}{Print matrices}
\alias{prmatrix}{print.matrix}
\keyword{print}{print.matrix}
\begin{Usage}
\begin{verbatim}
print.matrix(x, rowlab=character(0), collab=character(0),
             quote=TRUE, right=FALSE)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\texttt{x}] numeric or character matrix.
\item[\texttt{rowlab,collab}] (optional) character vectors giving row or column
names respectively.  By default, these are taken from
\texttt{\Link{dimnames}(x)}.
\item[\texttt{quote}] logical; if \texttt{TRUE} and \texttt{x} is of
\texttt{\Link{mode}} \texttt{\Link{character}}, \emph{quotes} (\texttt{".."}) are
used.
\item[\texttt{right}] if \texttt{TRUE} and \texttt{x} is of
\texttt{\Link{mode}} \texttt{\Link{character}}, the output columns are
\emph{right}-justified.
\end{ldescription}
\end{Arguments}
\begin{Description}
Pseudo-method for the \texttt{\Link{print}} generic.  Especially useful
with the \texttt{right} argument which does not (yet) exist for
\texttt{\Link{print.default}}.\end{Description}
\begin{Details}
\texttt{print.matrix} and \texttt{\Link{print.default}} both print
matrices, and each has at least an optional argument that the other
lacks.  Also, both directly dispatch into \texttt{.Internal} code
directly instead of relying on each other.
This mainly stems from historic compatibility and similar reasons should
be changed in the future.

\texttt{prmatrix} is currently just an \texttt{.Alias} for \texttt{print.matrix}.\end{Details}
\begin{Value}
Invisibly returns its argument, \texttt{x}.\end{Value}
\begin{SeeAlso}
\texttt{\Link{print.default}}, and other \texttt{\Link{print}} methods.\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
print.matrix(m6 <- diag(6), row = rep("",6), coll=rep("",6))

chm <- matrix(scan(file.path(system.file("help", pkg="eda"),"AnIndex"),
what=""),,2, byrow=T)
chm  #-> print.default(.)  = `same' as  print.matrix(chm)
print.matrix(chm, collab = paste("Column",1:3), right=TRUE, quote=FALSE)
\end{ExampleCode}
\end{Examples}

