\Header{print.coefmat}{Print Coefficients' Matrices}
\keyword{print}{print.coefmat}
\begin{Usage}
\begin{verbatim}
print.coefmat(x, digits=max(3, .Options$digits - 2),
              signif.stars = .Options$show.signif.stars,
              dig.tst = max(1, min(5, digits - 1)),
              cs.ind = 1:k, tst.ind = k + 1, zap.ind = integer(0),
              P.values = NULL,
              has.Pvalue = nc >= 4 && substr(colnames(x)[nc],1,3) == "Pr(",
	      na.print = "", ...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\texttt{x}] a numeric matrix like object, to be printed.
\item[\texttt{digits}] number of digits to be used for most numbers.
\item[\texttt{signif.stars}] logical; if \texttt{TRUE}, P-values are additionally
encoded visually as ``significance stars'' in order to help scanning of
long coefficient tables.  It defaults to the \texttt{show.signif.stars}
slot of \texttt{\Link{options}(.)}.
\item[\texttt{dig.tst}] number of significant digits for the test statistics,
see \texttt{tst.ind}.
\item[\texttt{cs.ind}] indices (integer) of column numbers which are (like)
\bold{c}oefficients and \bold{s}tandard errors to be formatted together.
\item[\texttt{tst.ind}] indices (integer) of column numbers for test statistics.
\item[\texttt{zap.ind}] indices (integer) of column numbers which should be
formatted by \texttt{\Link{zapsmall}(.)}, i.e., by ``zapping'' values
close to 0.
\item[\texttt{P.values}] logical or \texttt{NULL}; if \texttt{TRUE}, the last column
of \texttt{x} is formatted by \texttt{\Link{format.pval}} as P values.
If \texttt{P.values = NULL}, the default, it is set to \texttt{TRUE}
only if \texttt{link\{options\}("show.coef.Pvalue")} is \texttt{TRUE}
\emph{and} \texttt{x} has at least 4 columns
\emph{and} the last column name of \texttt{x} starts with \texttt{"Pr("}.
\item[\texttt{has.Pvalue}] logical; if \texttt{TRUE}, the last column of \texttt{x}
contains P values; in that case, it is printed \emph{iff}
\texttt{P.values} (above).
\item[\texttt{na.print}] a character string to code \texttt{\Link{NA}} values in
printed output.
\item[\texttt{...}] Further arguments for \texttt{print(..)}.
\end{ldescription}
\end{Arguments}
\begin{Description}
Utility function to be used in ``higher level'' \texttt{\Link{print}}
methods, such as \texttt{\Link{print.summary.lm}},
\texttt{\Link{print.summary.glm}} and \texttt{\Link{print.anova}}.  The
goal is to provide a flexible interface with smart defaults such
that often, only \texttt{x} needs to be specified.\end{Description}
\begin{Details}
Despite its name, this is \bold{not} (yet) a method for the generic
\texttt{\Link{print}} function, because there is no class
\texttt{"coefmat"}.\end{Details}
\begin{Value}
Invisibly returns its argument, \texttt{x}.\end{Value}
\begin{Author}
Martin Maechler\end{Author}
\begin{SeeAlso}
\texttt{\Link{print.summary.lm}},
\texttt{\Link{format.pval}}, 
\texttt{\Link{format}}\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
cmat <- cbind(rnorm(3, 10), sqrt(rchisq(3, 12)))
cmat <- cbind(cmat, cmat[,1]/cmat[,2])
cmat <- cbind(cmat, 2*pnorm(-cmat[,3]))
colnames(cmat) <- c("Estimate", "Std.Err", "Z value", "Pr(>z)")
print.coefmat(cmat[,1:3])
print.coefmat(cmat)
options(show.coef.Pvalues = FALSE)
print.coefmat(cmat, digits=2)
print.coefmat(cmat, digits=2, P.values = TRUE)
options(show.coef.Pvalues = TRUE)# revert
\end{ExampleCode}
\end{Examples}

