r set working directory as current directory code example Example: r set working directory setwd("/Users/SampleUser/Desktop/R")