【发布时间】:2022-01-26 12:11:26
【问题描述】:
由于权限被拒绝,无法使用 {write.csv} 导出 CSV 文件:
#create file
x <- c(1,3,4,3,5,7,5,8,2,5,7)
#export file
write.csv(x,file="whatever.csv")
我总是收到这个错误:
Error in file(file, ifelse(append, "a", "w")) :
cannot open the connection
In addition: Warning message:
In file(file, ifelse(append, "a", "w")) :
cannot open file 'whatever.csv': Permission denied
我尝试使用管理员权限打开 R studio,重启 PC,关闭一切(包括 excel):权限仍然被拒绝...有任何线索吗?
【问题讨论】:
-
您使用的是什么操作系统?你的工作目录是什么(
getwd())?您是否尝试将文件保存在其他目录中?
标签: r csv permissions admin