On Mon, Oct 11, 2010 at 6:58 PM, Laurent Gatto <laurent.gatto@gmail.com>wrote:

> Dear all,
>
> I have some data to be included in a package. The data needs to be
> easily loadable by the users, optimally with data(), and consists of a
> set of class instances, classes that are defined in the package
> itself.
> Something like:
> myData1 <- new("aClass",...) ## in myData1.R
> myData2 <- new("aClass",...) ## in myData2.R
>
> that I would like to be loadable with
>
> data(myData1)
> data(myData2)
>
> Although putting the .R files that generate the data objects directly
> in the data directory would be the simplest solution, I can not this
> because the code is not self-sufficient. I can't figure out how to
> easily and automatically include these.
> What is the suggested way to include this kind of data in a package?
>
> Thank you very much in advance.
>
>
Hi, Laurent.

You can save() your data objects and put them in your data directory.  That
should do it.  Of course, you will want to document them, also.  You can
look at the "Writing R Extensions" manual for more details.

Sean

	[[alternative HTML version deleted]]

