How to get R to recognize your working directory as its working directory?

后端 未结 9 810
鱼传尺愫
鱼传尺愫 2020-12-25 13:27

I use R under Windows on several machines.

I know you can set the working directory from within an R script, like this

setwd(\"C:/Documents and Setti         


        
9条回答
  •  不知归路
    2020-12-25 13:45

    If you're using Emacs/ESS, this isn't a problem. I navigate to the directory where my R script is located, open it, then start an R ESS process. An R console pops up with the current directory as R's working directory.

    If you haven't converted to Emacs/ESS, I recommend it. (Though to prevent a flame war, I also note there are similar options for Vi users.)

    Hope that helps.

提交回复
热议问题