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

后端 未结 2 519
盖世英雄少女心
盖世英雄少女心 2021-01-13 08:27

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 pos

相关标签:
2条回答
  • 2021-01-13 09:03

    I wonder if in addition to @Yihui's answer if the process of copying from one machine to another changes the datetimes on the files so that they look out of date even when nothing has changed.

    Look at the dates on the files involved after copying. If you can figure out which files need to be newer than others then touching them may prevent the rebuilding.

    Another option would be to just paste in the chached pieces directly so that they are not rerun (though that means you have to rerun and repaste manually if you change anything in those parts).

    0 讨论(0)
  • 2021-01-13 09:05

    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.

    0 讨论(0)
提交回复
热议问题