I want to launch R help, I type ?dir.create
. It is giving me this strange error:
Error in file(out, "wt") : cannot open the connection
In addition: Warning message:
In file(out, "wt") :
cannot open file 'C:\Users\XYZ~1\AppData\Local\Temp\Rtmp86bEoJ\Rtxt32dcef24de2': No such file or directory
Please help me. What do I do to overcome this problem? Even googling this problem didn't give me much info.
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())
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
Ok.Thank you all.I was able to resolve this by changing the directory and exiting R and re-logging into swirl.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With