I am converting the BUGS examples in https://github.com/stan-dev/example-models/tree/master/bugs_examples into an examples-only package, with an .Rmd vignette for each example. The full package will be build on TravisCI.
Building a vignette for one example needs at least 2 minutes, so for debug builds it should be possible to include/exclude individual vignettes. I know that I can run individual Knit runs manually, but sometimes running the whole build is required.
In my current workaround the Rmd files are moved to another directory, but the solution is not nice. I am looking for something like this:
---
title: "Rats: a normal hierarchical model"
date: "`r Sys.Date()`"
build: "`r Sys.getenv("build_bugs_rats") != ''`"
output: rmarkdown::html_vignette
Other ideas welcome.
I'm not aware of a built-in way to selectively build or not build vignettes. My hack for this would be to adjust the .travis.yml
to do the following:
gh-pages
)BUILD_ALL_VIGNETTES
, then build and check the whole package with vignettes and push the compiled vignettes to the gh-pages
branch.gh-pages
branch.