Chapter 8 - Workflow: projects
There were no exercises for this chapter.
Notes - Project Workflows
To ensure reproducibility, I agree with the book that it is best to set RStudio to not preserve your workspace between sessions. You can also do the following to refresh your script:
- Press Cmd/Ctrl + Shift + F10 to restart RStudio.
- Press Cmd/Ctrl + Shift + S to rerun the current script.
It is also very important to keep your analysis organized. Have all your plots saved along with your analysis script, and the copies of the raw data in the same folder as your R script/R notebook. A way that RStudio can facilitate organization is through the Projects feature. By creating a RStudio project (.Rproj) in a specified directory, any scripts that you work on for the project will know to look in that directory when you read / write files, which saves time.
Whether you choose to use this feature or not, it is important to stay organized and have an easy way to return to a project and know what you did and which files / code are required to reproduce the analysis.