[R] Loading Rdata files in a Package
Prof Brian Ripley
ripley at stats.ox.ac.uk
Mon Jul 26 07:47:59 CEST 2010
>From ?data
2. files ending ‘.RData’ or ‘.rda’ are ‘load()’ed.
'.Rdata' (l/c 'd') files are not supported (although on
case-insensitive file systems they will work in _some_ circumstances,
but only some. Without the sessionInfo() output we asked for in the
posting guide, we can only guess if this such a file system.).
On Sun, 25 Jul 2010, Charles C. Berry wrote:
> 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
> 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
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-help
mailing list