[Rd] R CMD build --resave-data

From: Hervé Pagès <hpages_at_fhcrc.org>
Date: Sun, 10 Apr 2011 17:47:06 -0700


Hi,

More about the new --resave-data option

As mentioned previously here

   https://stat.ethz.ch/pipermail/r-devel/2011-April/060511.html

'R CMD build' and 'R CMD INSTALL' handle this new option inconsistently. The former does --resave-data="gzip" by default. The latter doesn't seem to support the --resave-data= syntax: the --resave-data flag must either be present or not. And by default 'R CMD INSTALL' won't resave the data.

Also, because now 'R CMD build' is resaving the data, shouldn't it reinstall the package in order to be able to do this correctly?

Here is why. There is this new warning in 'R CMD check' that complains about files not of a type allowed in a 'data' directory:  

http://bioconductor.org/checkResults/2.8/bioc-LATEST/Icens/lamb1-checksrc.html

The Icens package also has .R files under data/ with things like:

   bet <- matrix(scan("CMVdata", quiet=TRUE),nc=5,byr=TRUE)

i.e. the R code needs to access some of the text files located in the data/ folder. So in order to get rid of this warning I tried to move those text files to inst/extdata/ and I modified the code in the .R file so it does:

   CMVdata_filepath <- system.file("extdata", "CMVdata", package="Icens")    bet <- matrix(scan(CMVdata_filepath, quiet=TRUE),nc=5,byr=TRUE)

But now 'R CMD build' fails to resave the data because the package was not installed first and the CMVdata file could not be found.

Unfortunately, for a lot of people that means that the safe way to build a source tarball now is with

   R CMD build --keep-empty-dirs --no-resave-data

I hope the list of options/flags that we need to use to "fix" 'R CMD build' (and make it consistent with R CMD INSTALL) is not going to grow too much ;-)

Thanks,
H.

-- 
Hervé Pagès

Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M2-B876
P.O. Box 19024
Seattle, WA 98109-1024

E-mail: hpages_at_fhcrc.org
Phone:  (206) 667-5791
Fax:    (206) 667-1319

______________________________________________
R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Mon 11 Apr 2011 - 00:51:50 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 Mon 11 Apr 2011 - 15:30:42 GMT.

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

list of date sections of archive