you do have a dataset x. it is probably inside the test.rda file. start a fresh R session and library(yourPackage)
then ls() data(test) ls() ## you will probably have now have x. Should you need to use load, then use load("/full/path/to/test.rda") ## in quotes ls() The idiom for saving a dataset is save(mydataset, file="mydataset.rda") On Mon, May 21, 2012 at 8:45 PM, di jianing <jianin...@gmail.com> wrote: > 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! > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html<http://www.r-project.org/posting-guide.html> > and provide commented, minimal, self-contained, reproducible code. > [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.