Skip to main content

1.5) Description (cont'd)


Before you begin working on a project, you should create a folder on your computer where your files will be located. It’s best to create a new folder each time you start working on a new project or dataset, and copy into it any data files you need.

When you open R, you should immediately specify the directory where you’re going to keep your input and output data. If you’re using Windows, you can click on the File menu at the top left, click on “Change dir” and then navigate to your chosen directory and click OK. This will become the default location for opening files from and saving them to in this R session. Otherwise, you can type in a command: setwd("filepath") – replacing filepath with the address of your chosen directory. Do it now…

Green highlight like this contain additional information that may help your understanding. They can be ignored to start with if you’re suffering from information overload.