Message-ID: <5278E3A6.4070809@sapo.pt>
Date: 2013-11-05T12:25:10Z
From: Rui Barradas
Subject: Function does not see variables outside the function
In-Reply-To: <CAApZs+HuWo2zuKjjEfpjsYY7E21nUEpHVgpqRimyZOReO=AVAg@mail.gmail.com>
Hello,
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,
Rui Barradas
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
> 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.
>