[R] Function does not see variables outside the function
ruipbarradas at sapo.pt
Tue Nov 5 13:25:10 CET 2013
I believe the answer is no. Functions will first look in their
environment, and then in the parent frame, i.e., outside the function.
Hope this helps,
Em 05-11-2013 10:42, Zhong-Yuan Zhang escreveu:
> Dear experts:
> 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?
> Many thanks for your kind help.
> Best Regards Always.
> [[alternative HTML version deleted]]
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help