Skip to content
Prev 1125 / 12125 Next

[R-pkg-devel] Note and warning about subdirectory sizes

Hi all,

Thank you for your help.  The only original question I am still a bit
stuck on is #3.  I read a lot about the command today, and tried
several approaches, but am unsure how to remove that warning.

* 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


I work on a Mac with both RStudio and terminal (can do either).  In
either RStudio or terminal, I could run the command:

compactPDF("inst/doc", qpdf = Sys.which(Sys.getenv("R_QPDF", "qpdf")),
gs_quality = "ebook")

I would not get any output from that. And when I then run:

check()

I noticed the WARNING was still there.

I also ran:

R CMD build --compact-vignettes=gs

But then when I ran check(), I still noticed the WARNING.

I also ran:

build(compact-vignettes("gs+qpdf"))

which gave me the error:

Error in inherits(x, "package") : object 'compact' not found


I tried a few other syntax I found online, but they mostly gave me warnings.

So, what I would love for any advice/input on, is what I can do to
remove that WARNING (if I must)? I am not sure if I am running
commands incorrectly, running in the wrong folder, should be using
command/Rstudio, etc. Even reading advice online and looking at the
documentation of build and compactPDF is not solving this for me (and
it may be due to my inexperience with R and terminal).

Thanks again for any help!!!
On Sun, Oct 2, 2016 at 3:43 PM, Duncan Murdoch <murdoch.duncan at gmail.com> wrote: