Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

R knitr: is it possible to use cached results across different machines?

Tags:

r

knitr

Issue solved, see answers for details.

I would like to run some code (with knitr) on a more powerful server and then maybe have the possibility of making small changes on my own laptop. Even copying across the entire folder, it seems that the cache is rebuilt when re-compiling locally, is there a way to avoid that and actually use the results in the cache?

like image 267
user2252705 Avatar asked Jun 12 '13 08:06

user2252705


1 Answers

Update: the problem arose from different versions of knitr on different machines.


In theory, yes -- if you do not change anything, the cache will be kept. In practice, you have to check carefully what the "small changes" are. The documentation page for cache has explained when the cache will be rebuilt, and you need to check if all three conditions are met.

like image 62
Yihui Xie Avatar answered Nov 15 '22 08:11

Yihui Xie