- Future you and others will thank you!
- Make sure the projects can explain themselves by using “wordy” and “needs” words
- Set up a clear structure for the sub-folders: (e.g. data, fig, syntax)
- README is great but it depends on how well it is maintained
- You can work on more than one things at time
- You can easily share, reproduce and collaborate.
- Having a separate RProject for each project will keep everything contained and again organized!
- Don’t use file paths as strings. (e.g using paste or strsplit to combine file paths)
Instead install fs (file path handling) and here packages.
- The here package is designed to work inside a project. It helps build paths within a RProject.
- This is particularly useful if you work in team...each team member does not have to manually edit file paths.
Files names matter. It must be
- machine readable: no white space, punctuation, accented characters, case sensitivity, generally exclude any weird characters
- human readable: easy to understand, name contains info on file content and context
- Lastly, it must sort nicely: computer automatically sorts files names - don’t fight against its nature.
- Create a final and separate controller script that runs all of the files (e.g. like dominos)