7.4 Scripts

A script is a text file containing a set of commands and comments.

It can be saved and re-used later or be shared.

It is good practice to create a script and save all commands: let’s create a script for this course.

Go to File -> New File -> R script

import env

A new window will open in the upper-left panel. Now save the file in the course folder (you can name it workshop.R)

Save all commands you will use during the course, and save changes regularly!

TIP: you can send a line or selected lines from the script to the console without copy-pasting: press CTRL+ENTER when highlighting the row.