Re: [R] Including data when building an R package in windows

From: Duncan Murdoch <murdoch_at_stats.uwo.ca>
Date: Wed, 09 May 2007 06:38:59 -0400

On 09/05/2007 6:12 AM, michael watson (IAH-C) wrote:
> Turns out calling the file DetectiV.rda (rather than .Rdata) fixed it.

The documentation says to use ".RData", not ".Rdata". Case-sensitivity is important here, because you're building something that is supposed to be portable across many platforms.

Duncan Murdoch

> Odd.
>
>
> -----Original Message-----
> From: michael watson (IAH-C)
> Sent: Wed 09/05/2007 11:09 AM
> To: michael watson (IAH-C); r-help_at_stat.math.ethz.ch
> Subject: RE: [R] Including data when building an R package in windows
>
> I forgot to mention. After using package.skeleton(), I replaced the six .rda files with a single .Rdata file that contained all six data frames.
>
> -----Original Message-----
> From: r-help-bounces_at_stat.math.ethz.ch on behalf of michael watson (IAH-C)
> Sent: Wed 09/05/2007 10:58 AM
> To: r-help_at_stat.math.ethz.ch
> Subject: [R] Including data when building an R package in windows
>
> I've done this before, but when I tried the same thing this time, it didn't work.
>
> I'm using R 2.4.1 on windows.
>
> I have 6 data frames that I want to include in a package I am building. Instead of making users issue six different "data(...)" commands, I want to wrap them all up in one file so that users issue one "data(...)" command and have access to all six data sets.
>
> I had the functions and data loaded in R, nothing else, used package.skeleton() to create the structure.
>
> Edited everything I needed to (help etc)
>
> Ran "R CMD INSTALL --build DetectiV" in MS-DOS, the package built.
>
> Installed the zip file. Everything fine.
>
> In R:
>

>> library(DetectiV)
>> data(DetectiV)

> Warning message:
> data set 'DetectiV' not found in: data(DetectiV)
>
> C:\Program Files\R\R-2.4.1\library\DetectiV\data contains filelist and Rdata.zip.
>
> filelist is:
>
> DetectiV.Rdata
> filelist
>
> Rdata.zip contains a file called DetectiV.Rdata.
>
> This the exact same structure I have in place for another of my packages - and that one works when I issue data(...) commands, whereas this one doesn't.
>
> So, any ideas what I am doing wrong?
>
> Thanks
> Mick
>
> ______________________________________________
> R-help_at_stat.math.ethz.ch 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.
>
> ______________________________________________
> R-help_at_stat.math.ethz.ch 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.


R-help_at_stat.math.ethz.ch 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. Received on Wed 09 May 2007 - 10:44:55 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 09 May 2007 - 11:31:41 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.