How to upload to Google Drive from R

0

I was seeing about the googledrive package of R's CRAN and I can not seem to get it to work, how to get it into my account. My goal is to upload a data frame and as CSV, direct to my account.

    
asked by anonymous 01.08.2018 / 23:27

1 answer

0

Hello! Just do the following:

library(googledrive)
write.csv(mtcars, file = "dados.cars.csv") # Arquivo de exemplo para fazer o upload
googledrive::drive_upload(media = "/seu.diretorio/dados.cars.csv", 
                          path = "nome.do.arquivo.para.aparecer.no.drive.csv")

If you put type = spreadsheet your file becomes a spreadsheet.

When you first upload, you will have to give the googledrive API permission. The drive_update function updates the file type or its metadata.

Google Drive Documentation

    
22.11.2018 / 13:10