Skip to content
Prev 46266 / 63461 Next

Problem with distributing data in package.

On 20/07/2013 12:01, Simon Knapp wrote:
We have little idea what you did.  Apparently you feel you are exempted 
from the request in the posting guide for a reproducible example.

At a wild guess, you did not understand the point of R CMD build 
--no-resave-data and did not want your data resaved as a .rda file (the 
documented default).  But there is no mention of running 'R CMD build' here.
Actually, it seems to be *interpretable* R code in a .R file.

The help file for data() says:

Details:

      Currently, four formats of data files are supported:

        1. files ending ?.R? or ?.r? are ?source()?d in, with the R
           working directory changed temporarily to the directory
           containing the respective file.  (?data? ensures that the
           ?utils? package is attached, in case it had been run _via_
           ?utils::data?.)
...

and (in so far as we can tell without the requested example) that was 
the 'format' intended to be used.