# NOT RUN {
## Upload a csv file into a Google Sheet
file <- drive_upload(
drive_example("chicken.csv"),
type = "spreadsheet"
)
## Download Sheet as csv, explicit type
(downloaded_file <- drive_download(file, type = "csv"))
## See local path to new file
downloaded_file$local_path
## Download as csv, type implicit in file extension
drive_download(file, path = "my_csv_file.csv")
## Download with default name and type (xlsx)
drive_download(file)
## Clean up
unlink(c("chicken.csv", "chicken.csv.xlsx", "my_csv_file.csv"))
drive_rm(file)
# }
Run the code above in your browser using DataLab