Create a R project

Step 1: go to “file” and choose “New Project”

Step 2: choose “New Directory”

Step 3: choose “New Project”

Step 4: click the “Browse” to select the directory, that is to choose a place in your computer to save the R project. In this case, I choose the “Desktop” for demonstration.

Step 5: write the name for your R project in the “Directory name” box. In this case, I give a name “Advanced quant project”.

Step 6: at this moment, a R project named “Advanced quant project” has been created. You can see the interface reflects the name of your R project.

Step 7: now you can find a file in the desktop named “Advanced quant projec”. Click it, you can find there are two things inside it. The file named “Advanced quant project.Rproj” is the R project.

Step 8: to close a R project, you go back to the Rstudio interface. Go to “File” and select “Close Project”.

Step 9: in the future, you can double click the project icon in your “Advanced quant project” folder to re-open the R project.

Create a R script

Step 1: click the button here

Step 2: select “R Script”

Step 3: you will see that the R script is untitled. To give a title to the R script, you click the “save” button. Then you will be asked to give a name to the untitled R script. In this case, I name it “Session 1”. You will find that the “Session 1” R script is created in the “Advanced quant project” R project file. This is because you are working under this project. So all the R scripts created will be saved there.

Step 4: now, you will find that the “Session 1.R”, that is, the R script just created can be seen from interface. I now give some notes in the R script, by writing down “#Session 1: Introduction 04.09.2024”.

Step 5: lastly, open the “Advanced quant project” file. You can see your “Session 1. R” you just created.