File: findGlobals.Rd

package info (click to toggle)
codetools 0.2-20-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 228 kB
  • sloc: makefile: 15
file content (30 lines) | stat: -rw-r--r-- 815 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
\name{findGlobals}
\title{Find Global Functions and Variables Used by a Closure}
\usage{
findGlobals(fun, merge = TRUE) 
}
\alias{findGlobals}
\arguments{
  \item{fun}{function object; usually a closure.}
  \item{merge}{logical}
}
\value{
  Character vector if \code{merge} is true; otherwise, a list with
  \code{functions} and \code{variables} character vector components.
  Character vectors are of length zero For non-closures.
}
\description{
  Finds global functions and variables used by a closure.
}
\details{
  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}).
}
\author{Luke Tierney}

\examples{
findGlobals(findGlobals)
findGlobals(findGlobals, merge = FALSE)
}
\keyword{programming}