clemlaflemme clemlaflemme - 13 days ago 5
R Question

Leftovers from knitr

I am using

knitr
to write a vignette for my package. In
R CMD CHECK
I got the following NOTE:

The following directories look like leftovers from 'knitr'
‘cache’, ‘figure’


These are indeed directories created by
knitr
. But I don't understand how I can remove these after knitting the document into .pdf.

I found one related issue on github but no answer.

Answer

One solution is to put

figure$
cache$

in a .Rbuildignore file in the main package directory. (This only works if you R CMD check on a built tarball rather than on the package source directory, but that's recommended as best practice anyway ...)

Comments