knitr - R CMD build fails to ignore vignette referenced in .Rbuildignore

I have a vignette that I want to exclude from a build. Yes, I could delete it, but I think .Rbuildignore is supposed to help me here. I referenced the file in .Rbuildignore and it does not end up in the package. However, R CMD check gives a warning:

 * checking 'build' directory ... WARNING
 Output(s) listed in 'build/vignette.rds' but not in package:
   'inst/doc/ignoreMe.pdf'

Here is a related question R CMD build skips knitr/Rmd vignettes - "Output(s) listed in 'build/vignette.rds' but not in package" only, I wanted the vignette ignored (and for it to not generate a warning when it is ignored). Is that possible?

This does not appear to be mentioned in the Writing R Extensions index link to .Rbuildignore.

Why would I want to do this? My development cycle has version n getting polished off while version n+1 is in the works. This vignette is part of n+1 and .Rbuildignore helps me exclude everything else from that version.

2 Answers

  1. Kenny- Reply

    2019-11-13

    I had the same problem and I sorted it by removing the VignetteBuilder argument from the DESCRIPTION file. Not sure if this is also your case.

  2. Kevin- Reply

    2019-11-13

    This turned out to be a bug in R. It is claimed to be fixed in R 3.4.1. see bugs.r-project.org/bugzilla3/show_bug.cgi?id=17246.

Leave a Reply

Your email address will not be published. Required fields are marked *

You can use these HTML tags and attributes <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>