Why and how to create R Projects
It is recommended that you start a new Project for every study/report. An R Project is the easiest way to keep track of all your files, scripts and versions.
When launching a new study/report, do the following to launch a project:
- Create a new folder on your computer.
- Start RStudio and create a new R Project (
File » New Project) and save it in the folder you just created.
This will save an
.Rproj file in that folder. You can now open your project by clicking that
.Rproj file. By using projects, you can always continue where you left off previously, and all your files, history and source documents will be restored, as well as the script tabs that were open before quitting the last time. You should always save your scripts and projects continuously.
Below follows screenshots demonstrating how to create a new project. We will call the project
Study1, and place it in the folder
MyNewProject on the desktop.
You can tweak the settings for an individual R Projects by going to
Tools » Project Options.
Next time you want to continue working on your study/report, you simply click the
.Rproj file in the folder, and your working environment will be re-created.