Re: R-beta: scoping etc

Peter Dalgaard BSA (p.dalgaard@biostat.ku.dk)
21 Feb 1998 12:46:33 +0100


To: Bill Venables <wvenable@attunga.stats.adelaide.edu.au>
Subject: Re: R-beta: scoping etc
From: Peter Dalgaard BSA <p.dalgaard@biostat.ku.dk>
Date: 21 Feb 1998 12:46:33 +0100
In-Reply-To: Bill Venables's message of Sat, 21 Feb 1998 16:59:38 +1030

Bill Venables <wvenable@attunga.stats.adelaide.edu.au> writes:

[Lots of sensible stuff]
> There are some cases when you do want to create something that is
> globally visible, but for the duration of the current expression
> only.  This is what the S structure known as "frame 1" is for.  I
> have yet to discover how to access this in R (or if it is
> possible at all) but it can be a useful device, even if the
> practice of using it to story temporary global variables is not
> free of the criticism that it, too, can be a dangerous
> side-effect.  Most powerful things are at the same time
> dangerous.

Now that you mention it... Actually, "frame 1" has always been one of
my favourite gripes with S. It may be useful as a scratch pad, and
with the S scoping probably necessary, but it breaks self-similarity:
Things viewed from inside a function can never be like they are from
the base level. This is not harmless, for instance it makes the
creation of interactive shell-type systems absolutely impossible,
because frame 1 will not be cleaned up before exit from the entire
system. 

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

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._