.BG
.FN prmatrix
.TL
Print a Matrix
.CS
prmatrix(x, rowlab, collab)
.AG x
a matrix, i.e., `length(dim(x))' is 2.
.AG rowlab
optional character vector of row labels.
.AG collab
optional character vector of column labels.
.RT
`x', with the invisible flag set to prevent reprinting.
.SE
`prmatrix' prints `x' as a matrix.
It is called as a result of automatically printing a matrix or a
multi-way array.
A format is chosen for each column, for each page, so that columns
line up.
Wide matrices are broken into blocks by choosing as many columns as fit
on one line.
If `x' has a `"dimnames"' attribute, `dimnames(x)[[1]]' provides row
labels, if it has length > 0, and similarly `dimnames(x)[[2]]' provides
column labels.
If an explicit call
to `prmatrix' supplies either `rowlab' or `collab', these will be used
instead.
Otherwise, row labels are made up to look like row subscripts
(`"[1,]"', etc.) and column labels are made up to look like column
subscripts (`"[,1]"', etc).
.PP
After each page of output, the column labels are printed again, so that
there should always be a copy of the column labels on the screen
at any time.  To avoid multiple copies of the column labels, execute
.Cs
options(length=10000)
.Ce
to specify a very long page.
A new format may be chosen at the end of each page.
.SA
`print', `prarray', `options'.
.EX
.Si "state.x77[, 1:4]"
              Population Income Illiteracy Life Exp
      Alabama       3615   3624        2.1    69.05
       Alaska        365   6315        1.5    69.31
      Arizona       2212   4530        1.8    70.55
     Arkansas       2110   3378        1.9    70.66
\&...
.KW print
.WR
