From ripley at stats.ox.ac.uk  Fri Oct 24 16:08:26 2003
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Fri Oct 24 16:07:24 2003
Subject: [Rd] data/ and data()
In-Reply-To: <3F992EAD.3000906@bankofcanada.ca>
Message-ID: <Pine.LNX.4.44.0310241506320.1466-100000@gannet.stats>

I hope if we change the data() mechanism this can be solved.  The problem 
is that you can do

data(foo, package="bar")

but if we do things at install time we can arrange for bar to be loaded
(or at least the namespace of bar to be loaded).

On Fri, 24 Oct 2003, Paul Gilbert wrote:

> (Changed thread from  [Rd] Accessing data files w/ --use-zip-data.)
> 
> Prof Brian Ripley wrote:
> 
> > I have been proposing, and may implement as soon as 1.9.0, to process all
> >
> >the data directory at install time to .rda files in a database (details 
> >depend on Luke's final choice of implementation)  which is load-on-demand 
> >and perhaps unload if not currently used.  So it not a good idea to use 
> >the data directory for files other than those to be accessed by data().
> >
> An issue related to data files that needs to be reconsidered (IMO) is 
> the fact that data files cannot use functionality defined in the 
> package, according to Writing R Extensions.
> 
> This is not too serious a problem with S3 classes, but to the limited 
> extent that I understand S4 classes, I think this means that a package 
> cannot have example data in a class stucture that is defined in the 
> package. This will certainly hinder my ability to switch to S4 classes 
> (assuming that I ever get the time to try it).
> 
> Paul Gilbert

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595


[Rd] data/ and data()
Prof Brian Ripley