Rstudio set working path

Here are two methods

1.

The default working path is generally the home installation directory of Rstudio , such as "D:\Program Files\RStudio", and we usually set a special path for saving data documents and scripts.

Under the Tools main menu, click Global options, as shown below:

You can modify the default working path in the default working directory, click browse to modify, and then save. After reopening Rstudio, the working path will become the modified path.

2.

Set the working directory directly with code

getwd()  #当前的工作目录
setwd("D:/R project") #设置工作目录

Just replace the path in the double quotes above with the path you want to set. Note that backslashes are used.

Guess you like

Origin blog.csdn.net/weixin_56845253/article/details/128967228