[R-pkg-devel] Handling packages required to build vignettes

Heather Turner ht at heatherturner.net
Wed Jan 17 13:33:24 CET 2018


Dear All,

Since the Fedora checks on R-devel are not currently using packages from
Bioconductor, one of my packages is giving new warnings. In my case (and
it appears for a number of others) this is due to using
BiocStyle::html_document format in the package vignette.
Since BiocStyle is only required to build the vignette, I had put it in
Suggests, but clearly this is not acceptable. So the question is what to
do instead. Possibilities include:
1. Use bookdown::html_document2 instead. This would probably be okay to
   pass CRAN checks as bookdown is on CRAN, but if bookdown were not
   available the check would fail. The features lost are relatively
   minor: document styling, date line, package version line, inline
   table of contents, wide figures.
2. Use html_document instead. If the rmarkdown package is available, the
   only additional loss from 1. is figure and table referencing (the raw
   references are shown instead). Otherwise the knitr vignette engine
   reverts to R Markdown v1, losing information in the YAML header
   (title, authors and affiliations, abstract) and breaking citations
   (no references shown).
As the result deteriorates moving from BiocStyle to bookdown  to
rmarkdown to knitr, it would be great to have a way to use the best
output format given the packages available. I don't think it is possible
to have conditional code in the YAML header, so I guess the only way to
do this is via a custom vignette engine. Ideally this would be
incorporated in knitr so that it can cope with a preference list of
output formats, rather than everyone having to add custom engines to
their packages.
Does this sound like a good solution? If so, I'm happy to work on it and
with anyone else that would like such a thing. Suggestions of how best
to do this, or of better alternatives welcome.
Best wishes,

Heather

	[[alternative HTML version deleted]]



More information about the R-package-devel mailing list