Skip to content
Prev 6916 / 12125 Next

[R-pkg-devel] R vignettes

On 28/04/2021 2:44 p.m., Danielle Maeser wrote:
You may be missing the line

   VignetteBuilder: knitr

in your DESCRIPTION file.  Without that, R won't know how to interpret 
your vignette.

It's also a little unusual to use

   %\VignetteEngine{knitr::markdown}

nowadays; the more common engine is knitr::rmarkdown (but I believe both 
are still supported).  If you make this change you should also have

   rmarkdown::html_vignette

as the output format.

Finally, since a recent update of knitr, you need to make sure that 
package holding the output format (i.e. markdown currently, rmarkdown if 
you make the change above) is declared as a Suggested package in your 
DESCRIPTION file.

Duncan Murdoch