1.6 Create an R script file

You want to create an R script file write your program, also known as a script. Script files allow you to add to and rerun the work that you have done. You can create many script files, but one will do for now. To create an R script file:

  1. Click the “File” menu, select “New File”.
  2. Click on “R Script”.

Note: this file is unnamed. Save it now and save it often! To save a file:

  1. Preferred: Use the key command, Ctrl-S in Windows, Cmd-S on the Mac. (This is preferred because it is fast. It is good to make a habit of saving files in all applications regularly!)
  2. Works fine: Use the Save command in the File menu.

Watch a video to show you how create an R script file.