Saving to hard drive

Dear all, i have just created a csv file on rstudio and i will like to save this file to my hard disk.
I googled this issue and stack overflow offered a solution using the following:

gcs_get_object("tablename.csv", saveToDisk= "tablename.csv")

I tried it and got an error saying: function not found.
I will appreciate a working solution for this issue as i need this for a project i am working on.
Thanks.

i figured out a no-code solution
i simply selected the table, clicked the ''gear'' button and selected export
i guess i missed this at first.

I take it that you have a data frame that you want to save as a csv. If the data frame is named DF, you can use

write.csv(DF, file = "filename.csv", row.names = FALSE)

Setting row.name = FALSE is not required; it is my preference.
If you are not trying to save a data frame, please explain what kind of object you are trying to save.

2 Likes

Thanks @FJCC , I was actually trying to save to my hard disk.
I think this would just save as a csv but still on rstudio cloud; i was looking to export to my hard disk.
Thanks.

This topic was automatically closed 7 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.