问题:有没有办法可以返回成功或失败write.table
来电的结果?这就是我试过的:
> x <- write.table(mydata, file="AllDat.csv", sep=",", row.names = FALSE, col.names=TRUE, append=FALSE
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 'AllDat.csv': Permission denied
> x
NULL
即使成功write.table
,变量x仍为NULL。