[R-pkg-devel] R CMD build --resave-data not working

Rolf Turner r@turner @end|ng |rom @uck|@nd@@c@nz
Thu Mar 11 23:00:18 CET 2021


On Thu, 11 Mar 2021 12:57:00 -0800
Jonathan Callahan <jonathan using mazamascience.com> wrote:

> I am building a package using R 4.0.4 on OS X 10.15.7.
> 
> In a terminal I type:
> 
> R CMD build --resave-data AirSensor
> 
> Then, I check with:
> 
> R CMD check --as-cran AirSensor_1.0.8.tar.gz
> 
> Everything is fine until I see:
> 
> 
> * checking data for ASCII and uncompressed saves ... WARNING
> 
> 
> 
>   Note: significantly better compression could be obtained
> 
>         by using R CMD build --resave-data
> 
>                             old_size new_size compress
> 
>   example_pas.rda              1.6Mb    1.1Mb       xz
> 
>   example_pas_raw.rda          114Kb     86Kb       xz
> 
>   example_pat.rda              965Kb    444Kb       xz
> 
>   example_pat_failure_A.rda    527Kb    259Kb       xz
> 
>   example_pat_failure_B.rda    411Kb    198Kb       xz
> 
>   example_sensor_scaqmd.rda    108Kb     76Kb       xz
> 
> I get the same WARNING if I submit to win-builder.R-project.org.
> 
> I've built many packages in the past and am currently stumped as to
> what might be happening.

I had the same problem, and asked about it some time back (c. 4
March) and was informed by Sebastian Meyer that:

> ... in R 4.0.0-4.0.4 the --resave-data option of R CMD build was
> ineffective for packages using LazyData. This bug has recently been
> fixed in R-devel (c79573) and I think the fix should also be ported
> to R-patched and appear in the NEWS.

A temporary workaround (again, thanks to Sebastian Meyer) is to run

    tools::resaveRdaFiles()

on your data directory prior to building.

cheers,

Rolf Turner

-- 
Honorary Research Fellow
Department of Statistics
University of Auckland
Phone: +64-9-373-7599 ext. 88276



More information about the R-package-devel mailing list