Re: [R] Creating packages with windows (accessing data)

From: Prof Brian Ripley <>
Date: Mon 18 Apr 2005 - 00:24:10 EST

Look at `Writing R Extensions' and the description of the DESCRIPTION file, specifically `LazyData'.

That is the manual about packages ....

On Sun, 17 Apr 2005, Alan Arnholt wrote:

> I have created a package (under Windows 2.0.1) with 300+ data sets and <20
> or so functions I use in teaching. However, to access the data, one needs
> to type data(foo) once the package has been installed and loaded. With
> other packages namely MASS, after the package is installed and loaded with
> library(MASS), it is possible to refer to a data set say Animals by simply
> typing Animals at the command prompt. I would like to have similar
> functionality in my package. Would someone provide some hints as to what
> I need to do (read about xxx...or provide a line of code) so that the data
> in the package can be accessed once it is loaded without typing data(foo)
> all the time. Currently, when I type the name of a function it shows the
> code for the function. I would like it to also show the data when I type
> the name of any of the data sets. Thanks for the pointers in advance.

Brian D. Ripley,        
Professor of Applied Statistics,
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________ mailing list
PLEASE do read the posting guide!
Received on Mon Apr 18 00:32:03 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:31:13 EST