Saving output csv file in r

I have to save the output data in csv.
The code which I have is,
Write.csv(dat_sites_final,file=paste 0(file_save), row.names=FALSE)
Can you please correct the above code for me to save in csv?

Thanks in advance

Hi @Smitha,
Welcome to the RStudio Community Forum.

Your code line probably needs to be edited to the following:

write.csv(dat_sites_final, file=file_save,  row.names=FALSE) 

Note that R is case-sensistive and doesn't like stray spaces in function names.
This should work as long as "dat_sites_final" and "file_save" contain the correct content.
Try help(write.csv) for more information.


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

If you have a query related to it or one of the replies, start a new topic and refer back with a link.