\Header{format.info}{format(.) Information}
\keyword{character}{format.info}
\keyword{print}{format.info}
\keyword{programming}{format.info}
\begin{Description}\relax
Information is returned on how \code{\Link{format}(x, digits =
    options("digits"))} would be formatted.\end{Description}
\begin{Usage}
\begin{verbatim}
format.info(x, nsmall = 0)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] (numeric) vector; potential argument of
\code{\Link{format}(x,...)}.
\item[\code{nsmall}] (see \code{\Link{format}(*, nsmall)}).
\end{ldescription}
\end{Arguments}
\begin{Value}
An \code{\Link{integer}} \code{\Link{vector}} of length 3, say
\code{r}.
\begin{ldescription}
\item[\code{r[1]}] width (number of characters) used for \code{format(x)}
\item[\code{r[2]}] number of digits after decimal point.
\item[\code{r[3]}] in \code{0:2}; if \eqn{\ge}{>=}\code{1}, \emph{exponential}
representation would be used, with exponent length of \code{r[3]+1}.
\end{ldescription}
\end{Value}
\begin{Note}\relax
The result \bold{depends} on the value of
\code{\Link{options}("digits")}.\end{Note}
\begin{SeeAlso}\relax
\code{\Link{format}}, \code{\Link{formatC}}.\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
dd <- options("digits") ; options(digits = 7) #-- for the following
format.info(123) # 3 0 0
format.info(pi)  # 8 6 0
format.info(1e8) # 5 0 1 - exponential "1e+08"
format.info(1e222)#6 0 2 - exponential "1e+222"

x <- pi*10^c(-10,-2,0:2,8,20)
names(x) <- formatC(x,w=1,dig=3,format="g")
cbind(sapply(x,format))
t(sapply(x, format.info))

## using at least 8 digits right of "."
t(sapply(x, format.info, nsmall = 8))

# Reset old options:
options(dd)
\end{ExampleCode}
\end{Examples}

