Workflow
RStudio Projects
Over time, it will become increasingly hard to organize all your files, working directories and workspaces in a sensible manner. A reasonable big project will consist of multiple script files, data, output and plots. To keep everything toghether, RStudio Projects can be used (highly recommended). Therefore, when starting a new project in R, the first thing you should do is to create a RStudio project.
You can create a new RStudio project by clicking on File - New Project
in the RStudio window. You can either create a totally new directory, or choose an already existing folder for the project.
Scripts
Scripts are the documents code is saved in. Therefore, every time you start a new project, you should also create at least one script to put your code in. If you have a lot of code, you can also split it up among several scripts to make it more readable.
You can create a new script by clicking on File - New File - R Script
in the RStudio window.
Now it’s your turn! In the Workflow: Exercises you will set yourself up for the following workshop.