0

i have a drake plan and intend to switch the cache directory based on the input data (i.e. input-dir1 -> results-dir1). This has the advantage, that I don't need to rerun the full pipeline, if the data source switches.

Functions like make or loadd seem to always use find_cache, which defaults to the .drake dir in the current R workspace.

Is there a way to define an default cache in the current global environment that is not in the .drake dir? I would like avoid to define the cache manually in every call to make, clean, or loadd via the parameter cache.

Thanks

c0bra
  • 1,031
  • 5
  • 22

1 Answers1

0

Cache switching is uncommon, and it usually increases brittleness and decreases reproducibility. So I usually discourage it and have no plans to implement a global setting to set the cache. In your case, you can set your own global option or environment variable and supply it to the cache argument. There are ways to change the default value of cache, but please be careful.

landau
  • 5,636
  • 1
  • 22
  • 50