From ihaka@stat.auckland.ac.nz  Thu May 15 05:16:47 1997
From: ihaka@stat.auckland.ac.nz (Ross Ihaka)
Date: Thu, 15 May 1997 16:16:47 +1200 (NZST)
Subject: R-alpha: A Couple of Queries
Message-ID: <199705150416.QAA29118@stat1.stat.auckland.ac.nz>

1) I have been working on making R libraries more like those in S.
I thought it might be advisable to discuss the ideas before springing
them on you.  What I have done is changed things so that each library
has its own frame on the search path.  E.g.

	> search()
	[1] ".GlobalEnv"   "library:base"
	> library("eda")
	> search()
	[1] ".GlobalEnv"   "library:eda"  "library:base"
	> ls(pos=2)
	[1] "coefficients.tukeyline"  "fitted.values.tukeyline"
	[3] "line"                    "medpolish"              
	[5] "plot.medpolish"          "print.medpolish"        
	[7] "print.tukeyline"         "residuals.tukeyline"    
	[9] "smooth"                 
	> assign("x", 10, pos=2)
	> ls(pos=2)
	 [1] "coefficients.tukeyline"  "fitted.values.tukeyline"
	 [3] "line"                    "medpolish"              
	 [5] "plot.medpolish"          "print.medpolish"        
	 [7] "print.tukeyline"         "residuals.tukeyline"    
	 [9] "smooth"                  "x"                      

All the search-path aware functions (ls, objects, assign, get, rm,
etc) now have a pos= argument which can be used to specify a frame to
work on.

I have not given S style path-names to the source of the libraries
because libraries are really internal objects rather than external
directories.

Libraries will have a .First and .Last functions.

I have not done anything about name-space clutter, but I have a couple
of ideas on name hiding which might be possible ( basically, every
library would have to "export" the names it wanted to be visible to
users).

I have not decided whether the user's global environment could be
detached or whether libraries or data objects could be attached before
it on the search path.


2) I am going ahead with implementing saving and restoring of data in
XDR format, so that there will be less trouble with heterogeneous Unix
networks.  Because the format of saved files will change, we must
either be incompatible or have some mechanism for restoring old save
files.  I would rather avoid the compatibility route if possible.
Would anyone be seriously inconvenienced if old data files could not
be restored?  (Its not hard to build in compatibility, it would just
take time which could be spend elsewhere).
	Ross
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
r-devel 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-devel-request@stat.math.ethz.ch
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


R-alpha: A Couple of Queries
Ross Ihaka