7.1 Create and save a script

  • Store commands in a .R/.r file/script. It will be your dry labbook.

  • Create and save a script in RStudio with:

    • File -> New File -> R Script
    • File opens in the upper-left panel.
    • Once the file has opened: File -> Save
    • Specify a name: the extension .R is automatically added


  • Execute commands or blocks of commands from RStudio: