nal Message-
> > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
> > project.org] On Behalf Of Zhong-Yuan Zhang
> > Sent: Wednesday, November 06, 2013 7:32 AM
> > To: r-help@r-project.org
> > Subject: Re: [R] Function does not see variables outside th
[1] "g"
I hope this helps,
John
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
> project.org] On Behalf Of Zhong-Yuan Zhang
> Sent: Wednesday, November 06, 2013 7:32 AM
> To: r-help@r-project.org
> Subject: Re: [R] Function
Dear Experts:
I am very appreciate your comments and help!
Actually I am a new comer from MATLAB. If the function
can see global variables, then it may output wrong results without
any error messages. For example, there is a gloabl variable named
v, and I write one funciton with one lo
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
specific needs.
(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 t
On 05/11/2013 12:25, Rui Barradas wrote:
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.
That is not correct. The scoping rule when evaluatiing a function is to
look first in the evaluation frame, th
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 t
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 de
7 matches
Mail list logo