Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to upload a R data frame into a google drive ?

I am using googledrive package from CRAN. But, function - drive_upload lets you upload a local file and not a data frame. Can anybody help with this?

like image 581
pranav Avatar asked Dec 06 '25 05:12

pranav


1 Answers

Unfortunately I can find no way to push the dataframe up directly, but just to document for others trying to get the basics accomplished that this question touches upon is with the following code that writes a local .csv and then bounces it up through tidyverse::googledrive to express itself as a googlesheet.

write_csv(iris, 'df_iris.csv')
drive_upload('df_iris.csv', type='spreadsheet')
like image 158
leerssej Avatar answered Dec 09 '25 16:12

leerssej



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!