\HeaderA{format.pval}{Format P Values}{format.pval}
\keyword{print}{format.pval}
\begin{Description}\relax
\code{format.pval} is intended for formatting p-values.
\end{Description}
\begin{Usage}
\begin{verbatim}
format.pval(pv, digits = max(1, getOption("digits") - 2),
            eps = .Machine$double.eps, na.form = "NA")
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{pv}] a numeric vector.
\item[\code{digits}] how many significant digits are to be used.
\item[\code{eps}] a numerical tolerance: see \sQuote{Details}.
\item[\code{na.form}] character representation of \code{NA}s.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
\code{format.pval} is mainly an auxiliary function for
\code{\LinkA{print.summary.lm}{print.summary.lm}} etc., and does separate formatting for
fixed, floating point and very small values; those less than
\code{eps} are formatted as \code{"< [eps]"} (where \sQuote{[eps]}
stands for \code{format(eps, digits)}).
\end{Details}
\begin{Value}
A character vector.
\end{Value}
\begin{Examples}
\begin{ExampleCode}
format.pval(c(stats::runif(5), pi^-100, NA))
format.pval(c(0.1, 0.0001, 1e-27))
\end{ExampleCode}
\end{Examples}

