R CMD check gives a WARNING about 'inst/doc' directory

Hi,

I'm running R CMD check for my R package. My R version is 4.2.1, and I have the latest RStudio v2022.07.1. I encounter two warnings while I'm checking my package:

  • checking files in 'vignettes' ... WARNING
    Files in the 'vignettes' directory but no files in 'inst/doc':
    'package_name.Rmd'

  • checking package vignettes in 'inst/doc' ... WARNING
    Directory 'inst/doc' does not exist.
    Package vignette without corresponding single PDF/HTML:
    'package_name.Rmd'

I don't know what is going wrong. The 'inst/doc' directory doesn't exist, as it shoudn't. In the vignette folder, I have my 'package_name.Rmd' file.

The YAML part of my vignette is


title: "package_name package manual"
author: "Author name"
date: "r Sys.Date()"
output:
BiocStyle::html_document:
toc: true
vignette: >
%\VignetteIndexEntry{package_name package manual}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding[utf8]{inputenc}

In the DESCRIPTION file I have specified these.

Suggests: knitr, rmarkdown, BiocStyle
VignetteBuilder: knitr

I get the warning with Windows 10 and Linux (Ubuntu), so it's not OS related.

Update: these warnings don't actually occur with R 4.1.0.

I think the problem is my configuration at Project options > Build Tools . I have set --no-build-vignettes for Check, but this also somehow sets --no-build-vignettes for Build.

This is from the output of Check.

==> Rcmd.exe build --no-build-vignettes package_name
==> Rcmd.exe check --no-build-vignettes package_name_0.1.0.tar.gz

When I removed --no-build-vignettes from Check, everything worked fine. Still strange that this worked with R 4.1.0.

This topic was automatically closed after 45 days. New replies are no longer allowed.


If you have a query related to it or one of the replies, start a new topic and refer back with a link.