[R] Function does not see variables outside the function
carl at witthoft.com
Tue Nov 5 13:54:29 CET 2013
Why would you want to impose this restriction? Perhaps if you explain what
you are trying to do, we can suggest approaches that will satisfy your
(note- one can always redefine whatever variables are to be "excluded." E.g.
to keep the body of a function from referring to 'foo' in the calling
environment, just add the line 'foo<-NA' inside the function)
Zhong-Yuan Zhang wrote
> In MATLAB, functions cannot see variables outside the
> functions. However, in R, the functions can do that. Is there
> any settings that can disable this ability of functions?
> mailing list
> PLEASE do read the posting guide
> and provide commented, minimal, self-contained, reproducible code.
View this message in context: http://r.789695.n4.nabble.com/Function-does-not-see-variables-outside-the-function-tp4679762p4679768.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help