I struggle with this all the time. What’s the best way to organize projects?
Here’s on suggestion for organizing R from Software Carpentry
This is a directory structure I like from an older PLOS paper
For a typical R project, it looks something like this
1 2 3 4 |
DATA - raw data DOC - manuscripts RESULTS - plots or tables generated by analysis SRC - code |
The source code in R is often dependent on previous steps so I like to have
1 2 3 4 |
01load.R - loading data 02clean.R - manipulations to clean the data for analysis 03functions.R - any useful accessory functions 04do.R - the actual anaysis |