On 1 October 2020 at 19:13, Max Turgeon wrote:
| 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

For reference that is also outlined in the Anderson + Eddelbuettel, 2017, R
Journal article on 'hosting data packages via drat' which shows how to use
(optional) data packages via Additional_repositories.

https://journal.r-project.org/archive/2017/RJ-2017-026/index.html

Dirk

|   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-boun...@r-project.org> on behalf of 
Bennett Nicolas <nicolas.benn...@stat.math.ethz.ch>
| Sent: Thursday, October 1, 2020 1:46 PM
| To: r-package-devel@r-project.org <r-package-devel@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@r-project.org mailing list
| https://stat.ethz.ch/mailman/listinfo/r-package-devel
| 
|       [[alternative HTML version deleted]]
| 
| ______________________________________________
| R-package-devel@r-project.org mailing list
| https://stat.ethz.ch/mailman/listinfo/r-package-devel

-- 
https://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org

______________________________________________
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

Reply via email to