1.11 Setting your working directory

If your make sure that your working directory is set to the appropriate place, R will save all files there.

You can do this in two ways:

  1. In the lower right quadrant, go to the files tab. Find the three dots on the far right and move to the correct directory. Once there, go to the More menu and choose Set as working directory.

  2. Set the working directory in your script. Here is an example using OneDrive on my hard drive.

setwd("~/OneDrive - SUNY at Oneonta/Documents/Bills New Project")