[R] Loading Rdata files in a Package

Charles C. Berry cberry at tajo.ucsd.edu
Mon Jul 26 04:03:49 CEST 2010


On Sun, 25 Jul 2010, Andrew Leeser wrote:

> I have an .Rdata file saved in my "data" folder in a package I created. However,
> when I use the data() function it doesn't recognize that there any dataset
> exists within the package. Is there anything specific I need to do such that the
> data() function will load my dataset?

No reproducible example was provided.

Did you provide a name for the .Rdata file? e.g. mydat.RData

Run

 	example( package.skeleton )

then edit the 'mypkg' Rd files to put add dummy \title{} entries.

Then INSTALL, then run R,

 	library(mypkg)
 	data(d)
 	str(d)

.
.
.

Emulate what you see in mypkg/*

Or use package.skeleton() to get you started.


HTH,

Chuck

>
> Thanks in advance,
> Andrew
>
>
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at 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.
>

Charles C. Berry                            (858) 534-2098
                                             Dept of Family/Preventive Medicine
E mailto:cberry at tajo.ucsd.edu	            UC San Diego
http://famprevmed.ucsd.edu/faculty/cberry/  La Jolla, San Diego 92093-0901



More information about the R-help mailing list