Re: [R-pkg-devel] compression of vignettes
On 25.11.2019 00:45, Spencer Graves wrote: I encountered this or a similar problem with "https://github.com/sbgraves237/Ecfun/blob/master/vignettes/time2nextNuclearWeaponState.Rmd";. I tried both "R CMD build Ecfun" and R CMD build Ecfun --compact-vignettes". With both, "R CMD check Ecfun_0.2-2.tar.gz" included the following: * checking installed package size ... NOTE installed size is 7.2Mb sub-directories of 1Mb or more: doc 6.6Mb It is nice to have packages that are as small as possible, but we would not object to publish a package with the above size of (uncompressed) directories. Best, Uwe Ligges Suggestions? Thanks, Spencer Graves On 2019-11-21 11:43, Dirk Eddelbuettel wrote: 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 __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Re: [R-pkg-devel] compression of vignettes
I encountered this or a similar problem with "https://github.com/sbgraves237/Ecfun/blob/master/vignettes/time2nextNuclearWeaponState.Rmd";. I tried both "R CMD build Ecfun" and R CMD build Ecfun --compact-vignettes". With both, "R CMD check Ecfun_0.2-2.tar.gz" included the following: * checking installed package size ... NOTE installed size is 7.2Mb sub-directories of 1Mb or more: doc 6.6Mb Suggestions? Thanks, Spencer Graves On 2019-11-21 11:43, Dirk Eddelbuettel wrote: 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 __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Re: [R-pkg-devel] compression of vignettes
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 | e...@debian.org __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Re: [R-pkg-devel] compression of vignettes
Dear Mark, You rely on external packages like rcmdcheck and devtools, so if you insist on using those, you should contact the package authors. 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 Cheers Joris -- Joris Meys Statistical consultant Department of Data Analysis and Mathematical Modelling Ghent University Coupure Links 653, B-9000 Gent (Belgium) -- Disclaimer : http://helpdesk.ugent.be/e-maildisclaimer.php From: R-package-devel on behalf of R. Mark Sharp Sent: Thursday, November 21, 2019 5:08 PM To: R Package Devel Subject: [R-pkg-devel] compression of vignettes I have been unsuccessful with all of the following attempts to have compression of dynamically generated vignettes during the build on travis-ci and within RStudio. Help is appreciated. I have tried the following travis-ci YAML to have vignettes compressed. script: - R -e 'r <- rcmdcheck::rcmdcheck(".", args = c('--no-manual'), build_args = c('--compact-vignettes=both'); devtools::test(); quit(save = "no", status = if (length(c(r$errors, r$warnings)) > 0) { 1 } else { 0 }, runLast = FALSE)' script: - R -e 'r <- rcmdcheck::rcmdcheck(".", args = c('--no-manual', '--compact-vignettes=gs+qpdf'); devtools::test(); quit(save = "no", status = if (length(c(r$errors, r$warnings)) > 0) { 1 } else { 0 }, runLast = FALSE)' script: - R -e 'r <- rcmdcheck::rcmdcheck(".", args = c('--no-manual', '--compact-vignettes="gs+qpdf"'); devtools::test(); quit(save = "no", status = if (length(c(r$errors, r$warnings)) > 0) { 1 } else { 0 }, runLast = FALSE)' I have tried the following build arguments in RStudio --as-cran --compact-vignettes=gs+qpdf --as-cran --compact-vignettes=both R. Mark Sharp, Ph.D. Data Scientist and Biomedical Statistical Consultant 7526 Meadow Green St. San Antonio, TX 78251 mobile: 210-218-2868 rmsh...@me.com __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
[R-pkg-devel] compression of vignettes
I have been unsuccessful with all of the following attempts to have compression of dynamically generated vignettes during the build on travis-ci and within RStudio. Help is appreciated. I have tried the following travis-ci YAML to have vignettes compressed. script: - R -e 'r <- rcmdcheck::rcmdcheck(".", args = c('--no-manual'), build_args = c('--compact-vignettes=both'); devtools::test(); quit(save = "no", status = if (length(c(r$errors, r$warnings)) > 0) { 1 } else { 0 }, runLast = FALSE)' script: - R -e 'r <- rcmdcheck::rcmdcheck(".", args = c('--no-manual', '--compact-vignettes=gs+qpdf'); devtools::test(); quit(save = "no", status = if (length(c(r$errors, r$warnings)) > 0) { 1 } else { 0 }, runLast = FALSE)' script: - R -e 'r <- rcmdcheck::rcmdcheck(".", args = c('--no-manual', '--compact-vignettes="gs+qpdf"'); devtools::test(); quit(save = "no", status = if (length(c(r$errors, r$warnings)) > 0) { 1 } else { 0 }, runLast = FALSE)' I have tried the following build arguments in RStudio --as-cran --compact-vignettes=gs+qpdf --as-cran --compact-vignettes=both R. Mark Sharp, Ph.D. Data Scientist and Biomedical Statistical Consultant 7526 Meadow Green St. San Antonio, TX 78251 mobile: 210-218-2868 rmsh...@me.com __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel