R check warning: Files in the 'vignettes' directory but no files in 'inst/doc'

I had a similar issue with an Rmd vignette. I fixed it by changing the YAML header of the vignette to something like this:

---
author: "Name Surname"
date: "`r Sys.Date()`"
output: rmarkdown::html_vignette
vignette: >
  %\VignetteEngine{knitr::knitr}
  %\VignetteIndexEntry{Title of your vignette}
  %\usepackage[UTF-8]{inputenc}
---

I fixed the problem with adding the .pdf output of my Vignette to inst/doc

Although I am not sure, if this is the supposed solution, it made the warning disappear.


In my case, I was getting this issue because I had specified my YAML as per @Claudia's answer, but I had specified rmarkdown as the VignetteBuilder in the DESCRIPTION file. Using VignetteBuilder: knitr in my DESCRIPTION file fixed the problem.

Tags:

R

Cran

R Package