\HeaderA{getAnywhere}{Retrieve an R Object, Including from a Namespace}{getAnywhere}
\aliasA{argsAnywhere}{getAnywhere}{argsAnywhere}
\aliasA{print.getAnywhere}{getAnywhere}{print.getAnywhere}
\aliasA{[.getAnywhere}{getAnywhere}{[.getAnywhere}
\keyword{data}{getAnywhere}
\begin{Description}\relax
These functions locates all objects with name matching its argument,
whether visible on the search path, registered as an S3 method or in a
namespace but not exported. \code{getAnywhere()} returns the objects
and \code{argsAnywhere()} returns the arguments of any objects that
are functions.
\end{Description}
\begin{Usage}
\begin{verbatim}
getAnywhere(x)
argsAnywhere(x)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] a character string or name.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
The function looks at all loaded namespaces, whether or not they are
associated with a package on the search list.

Where functions are found as an S3 method, an attempt is made to find
which namespace registered them.  This may not be correct, especially
if a namespace is unloaded.
\end{Details}
\begin{Value}
For \code{getAnywhere()} an object of class \code{"getAnywhere"}.  This is a list with components
\begin{ldescription}
\item[\code{name}] the name searched for.
\item[\code{objs}] a list of objects found
\item[\code{where}] a character vector explaining where the object(s) were found
\item[\code{visible}] logical: is the object visible
\item[\code{dups}] logical: is the object identical to one earlier in the
list.
\end{ldescription}


Normally the structure will be hidden by the \code{print} method.
There is a \code{[} method to extract one or more of the objects
found.

For \code{argsAnywhere()} one or more argument lists as returned by \code{\LinkA{args}{args}}.
\end{Value}
\begin{SeeAlso}\relax
\code{\LinkA{get}{get}},  \code{\LinkA{getFromNamespace}{getFromNamespace}}, \code{\LinkA{args}{args}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
getAnywhere("format.dist")
getAnywhere("simpleLoess") # not exported from stats
argsAnywhere(format.dist)
\end{ExampleCode}
\end{Examples}

