On Fri, Feb 12, 2010 at 1:36 PM, Sharpie <ch...@sharpsteen.net> wrote: > > > blue sky wrote: >> >> 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? >> >> > > Try findGlobals() from the codetools package: > > require( codetools ) > > findGlobals( g ) > [1] "{" "f" "print" "x"
I don't what '{' and functions available in R libraries. I can manually exclude '{'. Is there an easy way to exclude the functions from R libraries? ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.