启动 R 帮助:文件错误(输出,“wt”):无法打开连接

qui*_*poy 18 r

我想启动 R 帮助,我输入?dir.create. 它给了我这个奇怪的错误:

文件错误(输出,“wt”):无法打开连接

另外: 警告信息:

在文件中(输出,“wt”):

无法打开文件“C:\Users\XYZ~1\AppData\Local\Temp\Rtmp86bEoJ\Rtxt32dcef24de2”:没有那个文件或目录

请帮我。我该怎么做才能克服这个问题?即使在谷歌上搜索这个问题也没有给我太多信息。

TMS*_*TMS 37

This happens when the temporary directory used by R is deleted. This usually happens when user or the system cleans up the tmp directory while the R session is running. Typically happens if the R session is open for a long time.

Remedy is very simple. You don't actually need to restart R. Just re-create the temporary directory by:

tempdir()
# [1] "C:\Users\XYZ~1\AppData\Local\Temp\Rtmp86bEoJ\Rtxt32dcef24de2"
dir.create(tempdir())
Run Code Online (Sandbox Code Playgroud)

NOTE: this happens to me more and more often in Windows 10... even within like 8 hour session only! Not sure why this happens. See this question: https://superuser.com/questions/1502272/windows-10-cleaning-up-my-temp-dir-too-often

  • 我从来没有想到过——你是我的救星。 (2认同)

qui*_*poy -4

好的。谢谢大家。我能够通过更改目录并退出 R 并重新登录 swirl 来解决此问题。