\HeaderA{findGlobals}{Find Global Functions and Variables Used by a Closure}{findGlobals}
\keyword{programming}{findGlobals}
\begin{Description}\relax
Finds global functions and variables used by a closure.
\end{Description}
\begin{Usage}
\begin{verbatim}
findGlobals(fun, merge = TRUE) 
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{fun}] closure.
\item[\code{merge}] logical
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
The result is an approximation. R semantics only allow variables
that might be local to be identified (and event that assumes no use
of \code{assign} and \code{rm}).
\end{Details}
\begin{Value}
Character vector if \code{merge} is true; otherwise, a list with
\code{functions} and \code{variables} components.
\end{Value}
\begin{Author}\relax
Luke Tierney
\end{Author}
\begin{Examples}
\begin{ExampleCode}
findGlobals(findGlobals)
findGlobals(findGlobals, merge = FALSE)
\end{ExampleCode}
\end{Examples}

