Chapter 5 Projects
Whenever you start a new research project, you should create a new R Project. The R project is a working directory where your .RProj
file, scripts, data, images, etc. will live. Creating a folder that contains all of the files for your new research project will keep you organized and make it easy for others to download and reproduce your work. We will open up a new project for this workshop and call it ABCD 2021
.
5.1 Creating a new project
- In order to create a new project in RStudio, click on the R icon with the plus sign in the top left corner of RStudio.
- Click on
New Directory
->New Project
. Name your new directoryABCD 2021
and store it somewhere on your computer using theBrowse
button. I would recommend storing it on your desktop.
5.2 Adding folders to a project
- Once you have a new directory, you can add folders to it. Let’s add a folder for
tools
. You can add a folder by clicking onNew Folder
in the files/plots/packages/help pane.
- You can nest folders within folders. For example, inside the
tools
folder, I want to create two more folders: ascripts
folder and adata
folder.