There are already some good answers on project management (eg. How to efficiently manage a statistical analysis project?). These are great, and make life a lot easier. In particular, the workflow that runs along the lines of
- Load raw data.
- Manipulate raw data into useful forms. (Unload raw data to save space).
- Perform analysis and store results.
- Make and store figures.
One thing that's still hard is to get from raw data to final results and figures, without having to run the whole project from scratch every time something changes. What I would like to be able to do is something like this:
- Attempt to create figure. Is manipulated data is available in memory?
- Yes: create figure.
- No: Does manipulated data exist on disk?
- Yes: Load manipulated data.
- No: Load raw data, manipulate, and save, then unload raw data objects.
Also, in each step it would be nice to have some trigger to force a full re-load, if the raw data has been updated.
Is there an existing framework in R for doing something like this? Or are there any recommended ways of doing this? As it stands, I often have to run everything from scratch, which can take ages (large data files, complex manipulations), and is a waste of resources