[R] Creating packages with windows (accessing data)

Alan Arnholt arnholt at cs.cs.appstate.edu
Sun Apr 17 15:23:25 CEST 2005


Dear R List,

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.

Alan-

Alan T. Arnholt
Associate Professor
Dept. of Mathematical Sciences
Appalachian State University




More information about the R-help mailing list