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