\Header{get}{Return a Variable's Value}
\keyword{data}{get}
\begin{Description}\relax
Search for an \R{} object with a given name and return it if found.\end{Description}
\begin{Usage}
\begin{verbatim}
get(x, pos=-1, envir=pos.to.env(pos), mode="any", inherits=TRUE)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] a variable name (given as a quoted character string).
\item[\code{pos}] position in search list, can be numerical or a quoted
string.
\item[\code{envir}] the environment to be used.
\item[\code{mode}] the mode of object sought.
\item[\code{inherits}] should the enclosing frames of the environment be
inspected?
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
The \code{mode} includes collections such as \code{"numeric"} and
\code{"function"}: any member of the collection will suffice.\end{Details}
\begin{Value}
This function searches the specified environment for a bound variable
whose name is given by the character string \code{x}.  If the
variable's value is not of the correct \code{mode}, it is ignored.

If \code{inherits} is \code{FALSE}, only the first frame of the
specified environment is inspected.  If \code{inherits} is
\code{TRUE}, the search is continued up through the parent frames
until a bound value of the right mode is found.

Using a \code{NULL} environment is equivalent to using the current
environment.\end{Value}
\begin{SeeAlso}\relax
\code{\Link{exists}}.\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
get("%o%")
\end{ExampleCode}
\end{Examples}

