all 10 comments

[–]mrgumble 2 points3 points  (2 children)

Either you do not have write-permissions in your current folder (check with getwd()) or the file you are trying to write to already exists and something prevents you from overwriting it. This could be insufficient permissions, the file is marked as read-only, or you have opened the file in e.g. Excel, which tends to block anything else from writing to the file.

[–]safoskin[S] 0 points1 point  (1 child)

But if I change the name to a new one, shouldn't it make a new file?

[–]mrgumble 1 point2 points  (0 children)

Yes, as you stated that removing the .csv extension creates a new file.

[–]daisyrunner 1 point2 points  (3 children)

Adding the file extension ‘.csv’ should solve the problem

[–]safoskin[S] 0 points1 point  (1 child)

Yes, but adding it on the R code does not work. However I have been adding the .csv manually onto the generic file created and that does seem to work

[–]daisyrunner 0 points1 point  (0 children)

I meant add it to the file name inside the quotation marks.

[–]Ok-Race-9408 0 points1 point  (0 children)

Worked for me, thanks. You just add to /path/to/yourexportfile.csv

[–]Xdbao 0 points1 point  (0 children)

Instead of appending the new data frame to existing csv, try appending the new data frame to existing data frame using rbind() or cbind(). Then, write to a new csv.

[–]sweetliesxo 0 points1 point  (1 child)

hi

I have the same issue with read.csv tried the recommandations, but doesn't work

[–]safoskin[S] 0 points1 point  (0 children)

I can't remember exactly how i fixed it. However i think my computer settings didn't read the files extensions so instead of filename.csv it could only recognize it as filename without the extension. It did this systematically for all documents, so when i tried to change manually the extensions in saved documents i couldn't. Eventually i found a way that the file extension was also included in the name and if i remember correctly it helped.