drake
is an R package that provides
make functionality entirely within R.
That is, it will run a set of commands in a hierarchical (or tree) structure.
Then, when when pieces of that structure changes,
drake will only re-run the pieces that need to be re-run.
I have been using
these two functions
to read in a directory worth of data.
Everytime I run these functions,
I need to re-read the entire directory.
It would be more convenient if I could use drake, or something similar,
so that I only need to reread the files that have changed.
So here is a script that will perform that process
Let’s take a look at the plan
Now to actually run the plan use
If you try to run the plan again, drake tells you
Now if a file changes, you can just rerun the plan.