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

\code{prmatrix} is currently just an \code{.Alias} for \code{print.matrix}.\end{Details}
\begin{Value}
Invisibly returns its argument, \code{x}.\end{Value}
\begin{SeeAlso}\relax
\code{\Link{print.default}}, and other \code{\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}

