Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
340 views
in Technique[技术] by (71.8m points)

R studio error: Can't save and can't write csv

I'm having issues savings R scripts. Also, the write.csv function fails to work. I get the error message below when I try to save an existing R script

enter image description here

I get the following error message when I try to save a new R script

enter image description here

I get the following error when I use write.csv enter image description here

Sometimes, these errors just disappear and then they reappear again.

Attempted solutions that did not work: -Restart computer -Uninstall/Reinstall R studio (latest version)

Please kindly suggest what the issue is and how I may resolve. Thanks!

question from:https://stackoverflow.com/questions/65880204/r-studio-error-cant-save-and-cant-write-csv

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

It seems to be permission based. Are you maybe trying to write into a directory where you have no access rights? What is the output of

home <- path.expand("~")
print(home)
file.access(home, 0)
file.access(home, 1)
file.access(home, 2)
file.access(home, 4)

?

If the output is looking good (correct path and zeros everywhere else), this may require multiple troubleshooting steps to figure out. But it may have something to do with Antivirus Software denying access rights as Scott Reves figured out on the R-community board (https://community.rstudio.com/t/access-denied-for-all-r-and-rstudio-activities-but-not-other-apps-in-previously-used-folders/11661).


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...