Rev 9615 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
\name{print.matrix}\title{Print Matrices}\usage{print.matrix(x, rowlab=character(0), collab=character(0),quote=TRUE, right=FALSE)}\alias{print.matrix}\alias{prmatrix}\arguments{\item{x}{numeric or character matrix.}\item{rowlab,collab}{(optional) character vectors giving row or columnnames respectively. By default, these are taken from\code{\link{dimnames}(x)}.}\item{quote}{logical; if \code{TRUE} and \code{x} is of\code{\link{mode}} \code{\link{character}}, \emph{quotes} (\code{".."}) areused.}\item{right}{ if \code{TRUE} and \code{x} is of\code{\link{mode}} \code{\link{character}}, the output columns are\emph{right}-justified.}}\description{Pseudo-method for the \code{\link{print}} generic. Especially usefulwith the \code{right} argument which does not (yet) exist for\code{\link{print.default}}.}\details{\code{print.matrix} and \code{\link{print.default}} both printmatrices, and each has at least an optional argument that the otherlacks. Also, both directly dispatch into \code{.Internal} codedirectly instead of relying on each other.This mainly stems from historic compatibility and similar reasons shouldbe changed in the future.%%-- ``signed: Martin Maechler''\code{prmatrix} is currently just an \code{.Alias} for \code{print.matrix}.}\value{Invisibly returns its argument, \code{x}.}}\seealso{\code{\link{print.default}}, and other \code{\link{print}} methods.}\examples{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=TRUE)chm #-> print.default(.) = `same' as print.matrix(chm)print.matrix(chm, collab = paste("Column",1:3), right=TRUE, quote=FALSE)}\keyword{print}