On 02/10/2016 4:05 PM, S johnson wrote:
Hi all,

I am running check() on an R package, and receive one note and one warning
(seem to be related):

* checking installed package size ... NOTE
  installed size is 25.9Mb
  sub-directories of 1Mb or more:

    doc       3.4Mb
    extdata  22.1Mb

* checking sizes of PDF files under ‘inst/doc’ ... WARNING
  ‘gs+qpdf’ made some significant size reductions:
     compacted ‘ePort.pdf’ from 1655Kb to 1076Kb
  consider running tools::compactPDF(gs_quality = "ebook") on these files

After pondering this note, I have three brief questions as follows,

1) When I run "du -hs" on the doc sub-directory, it lists its size as
only 10K. There is only one file inside the doc sub-directory, and
similarly, when I run "du -hs" on that one file, it lists its size as
only 10K. I wonder, then, why check() reports that this sub-directory
called doc is 3.4 Mb?

You are probably looking at the package source; the measurements are made after installation. At that point the vignettes have been copied into the doc directory.


2) My extdata sub-directory is rather large. It is certainly over 1Mb.
This is due to a few dozen example images (.png files) that we feel is
important to include in the package. In general, do notes like these prevent
CRAN submission acceptance? If so, what would be an alternative? I
imagine there were other packages that had extdata subdirectory with
example components that are larger than 1Mb - and upon a Google search
that seems to be the case. Still, I wanted to seek your input!

There isn't a hard and fast rule. If the data is necessary for the function of the package, then it will be allowed. If it is not needed, then maybe not. Often if the data is relatively stable but the code may be improved, you'll be asked to put them in separate packages, so that CRAN doesn't fill up with archived repetitions of the same data.


3) I am unfamiliar with what I should consider running compactPDF() on.
None of the files are PDF files. The doc sub-directory has one .R file, and
the extdata sub-directory has .R files, .png files (taking up the most
space), and .txt files.


That message is likely talking about a vignette. See the help page ?compactPDF for how to invoke it during a build.

Duncan Murdoch

______________________________________________
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

Reply via email to