codetools (version 0.2-16)

findGlobals: Find Global Functions and Variables Used by a Closure

Description

Finds global functions and variables used by a closure.

Usage

findGlobals(fun, merge = TRUE)

Arguments

fun

function object; usually a closure.

merge

logical

Value

Character vector if merge is true; otherwise, a list with functions and variables character vector components. Character vectors are of length zero For non-closures.

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 assign and rm).

Examples

Run this code
# NOT RUN {
findGlobals(findGlobals)
findGlobals(findGlobals, merge = FALSE)
# }

Run the code above in your browser using DataLab