Re: [R] Function does not see variables outside the function

2013-11-06 Thread Zhong-Yuan Zhang
Dear John Fox: I highly appreciate your help!!! Problems solved. Best Wishes Always. 2013/11/6 John Fox > Dear Zhong-Yuan Zhang, > > R is lexically scoped. Pretending that you're using a different programming > language is probably a bad idea. > > The findGl

Re: [R] Function does not see variables outside the function

2013-11-06 Thread Zhong-Yuan Zhang
; 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

[R] Function does not see variables outside the function

2013-11-05 Thread Zhong-Yuan Zhang
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