我想启动 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