[R-pkg-devel] Non-mainstream repository dependence for CRAN vignette building

Max Turgeon M@x@Turgeon @end|ng |rom um@n|tob@@c@
Thu Oct 1 21:13:42 CEST 2020


Hi Nicholas,

I see two potential solutions, maybe other people will suggest different ones:

  1. You can make the evaluation of the whole vignette dependent on the data packages being available. Here's an example from one of my packages: https://github.com/sahirbhatnagar/casebase/blob/3403e0451ba5f0bf122924729ba85a904cf16082/vignettes/smoothHazard.Rmd#L22-L27

  2. You create the vignette on your machine and add it to the package as a "static vignette". Here's a blog post on how to do it (it's also been discussed on this list before, have a look at the archive): http://www.markvanderloo.eu/yaRb/2019/01/11/add-a-static-pdf-vignette-to-an-r-package/

Each approach has its pros and cons. In the first solution, a potential issue is that the complete vignettes may rarely be available on a user's machine, unless they install the data package first and build from source. In the second solution, there's more maintenance for you.

Best,


Max Turgeon
Assistant Professor
Department of Statistics
Department of Computer Science
University of Manitoba
maxturgeon.ca<http://maxturgeon.ca>


________________________________
From: R-package-devel <r-package-devel-bounces using r-project.org> on behalf of Bennett Nicolas <nicolas.bennett using stat.math.ethz.ch>
Sent: Thursday, October 1, 2020 1:46 PM
To: r-package-devel using r-project.org <r-package-devel using r-project.org>
Subject: [R-pkg-devel] Non-mainstream repository dependence for CRAN vignette building

********************************************************
Caution: This message was sent from outside the University of Manitoba.
********************************************************

Dear list

I�m in the process of submitting a package to CRAN that uses a non-mainstream repository for several data packages that are too large for CRAN (~50 MB in total) and therefore live in a drat repository hosted by gh. Data from these packages is used during vignette building and unsurprisingly, CRAN checks throw a �re-building of vignette� warning.

1. Is such a warning acceptable or is vignette re-build required to run through?
2. Is it allowed to create a set-up that essentially runs `install.packages()` during CRAN checks to make the non-mainstream repo packages available?
3. Are there any go-to solutions for such a scenario? I tried knitr caching, but was unsuccessful, to get that to work. What I�m currently doing is masking the package function that loads data and supplying the required data with the package. But this unnecessarily inflates package size (and adds complexity), as the data is already conveniently and separately available as an R package.

Best,
Nicolas
______________________________________________
R-package-devel using r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

	[[alternative HTML version deleted]]



More information about the R-package-devel mailing list