Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

should I be (git)ignoring my knitr cache?

In a vein similar to this question: I'm writing a package and am using knitr to write a few documents in inst/doc/. Since I'm using github to host my repo (and I intend to point to people to that repo to get the package), I'm wondering if I should be version controlling my the caches of my various documents.

I ask this question because it's unclear where cache falls in the guidelines provided by this other question (which addresses when certain file types should and shouldn't be in the .gitignore of a repo).

Can anyone shed some light on to how package developers that use knitr and git are handling their caches?

like image 635
StevieP Avatar asked Mar 26 '14 06:03

StevieP


1 Answers

If R CMD check passes without the knitr cache, and I think it would, I wouldn't include them. In fact, I suspect R CMD check would give a note about the cache files being present in the package. I know for LaTeX files, you only want to include the .tex file in the R package and in the version control. The other required files should be automatically generated on install.

like image 162
iacobus Avatar answered Sep 28 '22 04:09

iacobus