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

后端 未结 9 809
鱼传尺愫
鱼传尺愫 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:42

    To set the R work directory like the current directory of the R script that I'm working, I always use a combination of the commands getwd() and setwd(), like this:

    path <- getwd() setwd(path)

    or

    setwd(getwd())

    If you want learn more about it, see this article.

    Cheers,

    []'s

提交回复
热议问题