[R-pkg-devel] Note: significantly better compression could be obtained ...
@eb@meyer @end|ng |rom |@u@de
Thu Mar 4 12:09:51 CET 2021
Am 04.03.21 um 10:24 schrieb Rolf Turner:
> On Thu, 4 Mar 2021 08:44:31 +0100
> Sebastian Meyer <seb.meyer using fau.de> wrote:
>> Am 04.03.21 um 01:41 schrieb Rolf Turner:
>>> ... by using R CMD build --resave-data
>>> But I *did* use that flag with my build command!!! And yet "R CMD
>>> check" seems to think that I didn't!
>> Just to be sure: Are you running R CMD check on that freshly built
>> tarball or is devtools::check() involved?
> The former. I have never used devtools::check().
>>> I have done "R CMD build --resave-data kanova" (where "kanova" is
>>> the name of the package in question), to make sure that I didn't
>>> fumble-finger somewhere, but there's no change. I always get that
>>> How on earth can I track down what's going wrong?
>> - Does the R CMD build log actually show "re-saving image files" or
>> "re-saving sysdata.rda"?
> Dunno what you mean by the "R CMD build log". I could grepped
> "re-saving" on all files and came up empty handed.
I meant the standard output of R CMD build.
With --resave-data, it should show something like
* checking for empty or unneeded directories
* re-saving image files
* building '.....tar.gz'
>> - Have you set the BuildResaveData field in your DESCRIPTION file?
>> This would take precedence over the --resave-data command line switch.
>> - Have you tried running ) on your source data
>> directory before building the package? Does that reduce the size of
>> your data files?
> Never heard of that. Tried it just now and it reduced the size from
> 285607 bytes to 161743 bytes. That's substantial I guess.
>> You'll get the NOTE when R CMD check finds that running
>> tools::resaveRdaFiles() on the data directory would reduce a file's
>> size by more than 10% with a different type of compression (if the
>> original size is >10KB).
> Now that I have applied tools::resaveRdaFiles(), I no longer get
> the NOTE from R CMD check. So I guess my problem is solved. Thanks.
> But this still leaves the question: Why the <expletive deleted> is
> R CMD check telling me to use the flag --resave-data, when I *just did
Yes, indeed! I've investigated further and found 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.
Thank you for reporting!
More information about the R-package-devel