0

I am trying to change the default working directory in RStudio (Version 1.4.1103) in mac ("Wax Begonia" (458706c3, 2021-01-06) for macOS). And I followed the instruction here (How do you change the default directory in RStudio (or R)?). After I change the directory under Tools | Global Options, however, the working directory stay the same even though I restarted RStudio. Is there anything else I could try.

Thank you!

Liyong
  • 1
  • 3
  • 1
    Have you tried the tips in [`?Startup`](https://stat.ethz.ch/R-manual/R-devel/library/base/html/Startup.html)? – r2evans Jan 28 '22 at 02:08
  • 1
    Not yet, thank you for the info, I will give it a try – Liyong Jan 28 '22 at 02:12
  • Nope, can't get it work. Thank you though. – Liyong Jan 28 '22 at 02:27
  • 1
    Are you "active" in a project? I believe the RStudio methods for setting the default working directory are reserved for when you are not in a project. – r2evans Jan 28 '22 at 02:31
  • I don't think so. Right now I just manually set the working directory through setwd(), might be able to figure it out later. – Liyong Jan 28 '22 at 02:43

1 Answers1

0

You can set the working directory using setwd(). Inside of setwd() you need to provide the path to the folder you want to be your working directory, such as setwd("C:/Desktop"). I typically set the working directory everytime I open R studio.

tassones
  • 891
  • 5
  • 18