Skip to content

include a dataset in my package

3 messages · di jianing, Richard M. Heiberger, Uwe Ligges

#
Hey R-users,

I think I followed the steps but still couldn't figure this out.. I am
creating a personal package and I want to include several datasets in
the package. I created a subdirectory 'data' in the package, save a
dataset 'test.rda' there, built the package, checked it, installed it.
Then I loaded the package and tried load(test), data(test),
attach(test), none of them gave me the actual data. Another thing,
which I am not sure if it is relevant, is that when I was checking the
package before installation, I got a warning (not an error) that I
have a dataset 'x' without document. I actually don't have any dataset
with the name 'x'.

Any thoughts?

thanks!
#
On 22.05.2012 06:24, Richard M. Heiberger wrote:
No, you meant

data(x)

Note that the name of the filename is still the original mname it had 
hen creating the rda file, the filename of the rda file is irrelevant 
(and it may contain more than just one object).

Best,
Uwe Ligges