我无法直接在R代码中设置/更改工作目录。相反,我必须在文件浏览器选项卡中手动设置它
由于某种原因,我无法在R代码本身中设置或更改工作目录。我将包含一个类似的行:
setwd("~/Documents/BeaverProject/HOBOData/Beav")
但是将遵循错误:
Error in setwd("~/Documents/BeaverProject/HOBOData/Beav") :
cannot change working directory
但是,如果我转到右下角的文件浏览器选项卡,然后单击“(齿轮图标)更多”,它为“提供”的选项。设置为工作目录“我可以用来将工作目录更改为所需的文件文件夹。
尽管这起作用,但这意味着我不能仅坐下来允许我的代码顺序运行,因为我必须在代码所需的每个点上手动更改工作目录。
有什么建议吗?
For some reason, I am unable to set or change my working directory in my R-code itself. I'll include a line such as:
setwd("~/Documents/BeaverProject/HOBOData/Beav")
But it will be followed with an error:
Error in setwd("~/Documents/BeaverProject/HOBOData/Beav") :
cannot change working directory
However, if I go to the file browser tab in the bottom right corner, and click "(gear icon) More", it provides an option to "Set as Working Directory" which I can use to change the working directory to the desired file folder.
While this works, it means that I can't just sit back and allow my code sequence to run because I have to manually change the working directory at every point in the code where it needs to.
Any suggestions?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论