\HeaderA{contents}{Function to retrieve contents of environments}{contents}
\keyword{manip}{contents}
\begin{Description}\relax
The contents method is used to retrieve the values stored in an
environment.
\end{Description}
\begin{Usage}
\begin{verbatim}
contents(object, all.names)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{object}] The environment (data table) that you want to get all contents from
\item[\code{all.names}] a logical indicating whether to copy all values in \code{as.list.environment}
\end{ldescription}
\end{Arguments}
\begin{Value}
A named list is returned, where the elements are the objects stored in
the environment.  The names of the elements are the names of the
objects.

The \code{all.names} argument is identical to the one used in
\code{as.list.environment}.
\end{Value}
\begin{Author}\relax
R. Gentleman
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{as.list.environment}{as.list.environment}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
  z <- new.env()
  multiassign(letters, 1:26, envir=z)
  contents(z)
\end{ExampleCode}
\end{Examples}

