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

michael watson (IAH-C) michael.watson at bbsrc.ac.uk
Wed May 9 11:58:26 CEST 2007


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



More information about the R-help mailing list