[R] Summary: do.call and environments

Peter Dalgaard p.dalgaard at biostat.ku.dk
Thu Mar 11 23:11:49 CET 2004


"Gabor Grothendieck" <ggrothendieck at myway.com> writes:

> S uses dynamic scoping, i.e. the parent environment in a function 
> is the environment at the point where the function is *called*.

Not really. The parent env. in S (or should I say: the other
implementation of S) is essentially the global environment only.
Actually, a little more complex since S operates with an "expression
frame" which is kind of sandwiched in between the function frame and
the global frame. However you don't have automatic access to the
variables of the caller as you would have in dynamic scoping. 

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907




More information about the R-help mailing list