Skip to content
Prev 6074 / 12125 Next

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

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>