\HeaderA{idx2dimnames}{Index to Dimnames}{idx2dimnames}
\keyword{manip}{idx2dimnames}
\begin{Description}\relax
A function to map from integer offsets in an array to the
corresponding values of the row and column names. There is probably a
better way but I didn't find it.
\end{Description}
\begin{Usage}
\begin{verbatim}
idx2dimnames(x, idx)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] a \code{matrix} or \code{data.frame}. 
\item[\code{idx}] An integer vector of offsets into the matrix (values
between 1 and the \code{length} of the matrix.
\end{ldescription}
\end{Arguments}
\begin{Value}
A list with two components.
If it is a LIST, use
\begin{ldescription}
\item[\code{rowNames }] The row names corresponding to the integer index.
\item[\code{colNames }] The column names corresponding to the integer index.
\end{ldescription}
\end{Value}
\begin{Author}\relax
R. Gentleman
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{dimnames}{dimnames}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
 data(Ndists)
 ltInf = is.finite(Ndists)
 xx = idx2dimnames(Ndists, ltInf)
\end{ExampleCode}
\end{Examples}

