how to change working directory in r code example Example: r set working directory setwd("/Users/SampleUser/Desktop/R")