R programming
Title
Question
Couldn't write csv file.
Getting error while using write.csv.
write.csv(captaincy,"newcaptaincy.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 'newcaptaincy.csv': Permission denied
R Introduction-to-Data-Frames-in-R 07-08 min 30-40 sec
Answers:
Try specifying a path for writing the file. If you are using Windows OS, you should use a path like C:/path/to/my/directory. Thus, the command will become
write.csv(captaincy,"C:/path/to/my/directory/newcaptaincy.csv")
Login to add comment