简体   繁体   中英

How to change the default working directory in RStudio

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!

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM