[R-pkg-devel] compression of vignettes
Dirk Eddelbuettel
edd @end|ng |rom deb|@n@org
Thu Nov 21 18:43:24 CET 2019
On 21 November 2019 at 16:43, Joris Meys wrote:
| The workflow as described in the manual :
| https://cran.r-project.org/doc/manuals/R-exts.html#Checking-and-building-packages
|
| is as follows :
|
| R CMD build pkg --compact-vignettes
| R CMD check pkg_x.y.z.tar.gz --as-cran
|
| In a basic Travis script this can be used as:
|
| script:
| - R CMD build . --compact-vignettes=gs+qpdf
| - R CMD check *tar.gz --as-cran
|
| You find more information here : https://towardsdatascience.com/travis-ci-for-r-advanced-guide-719cb2d9e0e5
You can also call the base R helper functions directly.
I like having simple command-line wrapper, so I added one to `littler` which
I can call as `compactpdf.r`. All it does (besides argument checking) is
loop over either the given pdf files (or those found in the current
directory) to then call
tools::compactPDF(f, gs_quality="ebook")
for each of them. That way you can simply compare 'before' and 'after'.
Similarly, I made compacting an option to the rendering script `render.r` I
often call directly from my editor when working on markdown files.
Dirk
--
http://dirk.eddelbuettel.com | @eddelbuettel | edd using debian.org
More information about the R-package-devel
mailing list