2.4 Am I ready to use R now?

Well almost. There is one thing we need to consider: telling R where is our working directory. By default R saves this to your documents (or somewhere else). Here, this is generally OK, though when working on your own data, things get more complicated.

There are two schools of thought here. 1. Create R scripts that run the analyses and saves the output(s) directly to your working directory. Does not save the .RData image at the end 2. Create a project: a self-contained folder, where all your scripts, figures, etc. will be automatically saved. Saves the .RData at the end

I subscribe to the second, as some of the computations I run take ages to finish.

2.4.1 Setting working directory

Click the menu Session -> Set Workign Directory -> Choose Directory or use setwd("path/to/directory") (choose the location where you want to save the results)

You can also use getwd() to know where is your current working directory.

2.4.2 Creating a project

Look at the top-right hand where you can see Projects (none). You can create a new project in a new path or based on a specific folder.