Download DoH Data Drop file via its Google Drive ID

datadrop_download(id, path = NULL, overwrite = FALSE, verbose = TRUE)

Arguments

id

A 33-character string identifier for the Google Drive file.

path

A character value for path for output file. If NULL, the default file name used in Google Drive is used and the default location is the working directory.

overwrite

Logical. If path already exists, should it be overwritten? Default to FALSE.

verbose

Logical. Should operation progress messages be shown? Default to TRUE.

Value

A file downloaded into specified path

Author

Ernest Guevarra

Examples

if (FALSE) { library(googledrive) ## Authentication googledrive::drive_auth_configure(api_key = Sys.getenv("GOOGLEDRIVE_TOKEN")) ## Deauthorise googledrive::drive_deauth() ## Get Google Drive ID for Case Information file in latest DoH Data Drop id <- datadrop_id_file(tbl = datadrop_ls(id = datadrop_id()), fn = "Metadata - Sheets.csv") ## Download the Case Information file into tempfile() datadrop_download(id = id, path = tempfile()) }