The goal of this tutorial is to set the working directory in the folder where the script is saved.
# We canuse the following line to set the working directory
setwd(dirname(rstudioapi::getActiveDocumentContext()$path))
In this tutorial we have learnt how to set the working directory in the actual folder of the script.