Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

R CMD build fails to ignore vignette referenced in .Rbuildignore

Tags:

r

knitr

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.

like image 917
pdb Avatar asked Dec 06 '16 19:12

pdb


2 Answers

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.

like image 162
Claudia Avatar answered Nov 15 '22 05:11

Claudia


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.

like image 26
pdb Avatar answered Nov 15 '22 05:11

pdb