Camtrap R - write csv

Hi Guys,
After creating a species detection history matrix in Camtrap R, I'm trying to save the matrix as a csv using write.csv but keep hitting the error:

write.csv(cats_autwinDet,file ="~/Documents/Deakin/Honours2019/Data/cats_autwinDet.csv")## save as csv. file
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 'C:/Users/zooto/Documents/Documents/Deakin/Honours2019/Data/cats_autwinDet.csv': No such file or directory

Why can't it find the directory when I set it as the 'Working Directory'?


If the directory you list in the write.csv command is already the working directory, you do not need to list it again. In that case, just write the file name. If that does not produce the result you want, please show what result you get from the command


Thankyou so much that fixed the problem: just added the file name I wanted & removed the rest as already set as Working Directory.

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.