[R-pkg-devel] R vignettes

Duncan Murdoch murdoch@dunc@n @end|ng |rom gm@||@com
Wed Apr 28 21:27:02 CEST 2021


On 28/04/2021 2:44 p.m., Danielle Maeser wrote:
> Hello,
> 
> I am doing a R CMD check on an R package I have developed. However, I keep
> receiving the warning below:
> 
> *Files in the 'vignettes' directory but no files in 'inst/doc':*
> 
> And
> 
> *Files named as vignettes but with no recognized vignette engine:*
> 
> I am pretty sure I have the correct YAML header for my vignettes, and also
> inst/docs is an older convention for vignettes that's no longer
> recommended.
> 
> Do you have an idea of what's going wrong? I have attached my YAML header
> below as reference.

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

> 
> Sincerely,
> Danielle
> 
> 
> 
> 
> 
> 
> 
> *title: "title of this vignette"author: "name"output:
> markdown::html_vignettevignette: >  %\VignetteIndexEntry{vignette title}
> %\VignetteEngine{knitr::markdown}  %\VignetteEncoding{UTF-8}*
>



More information about the R-package-devel mailing list