[R] Is there a way to figure out what nonlocal variables and functions have been used in a function?

blue sky bluesky315 at gmail.com
Fri Feb 12 16:41:23 CET 2010


x=10
f=function() {print('in f')}
g=function() {f(); print(x)}
g()

Suppose I have the above code, I want to know what functions and
variables have been used in the function g (in this case, f and x). Is
there a function to do so?



More information about the R-help mailing list