Learn R Programming

reproducible (version 1.1.1)

dlGoogle: Download file from Google Drive

Description

Download file from Google Drive

Usage

dlGoogle(
  url,
  archive = NULL,
  targetFile = NULL,
  checkSums,
  skipDownloadMsg,
  destinationPath,
  overwrite,
  needChecksums
)

Arguments

url

The url (link) to the file.

archive

Optional character string giving the path of an archive containing targetFile, or a vector giving a set of nested archives (e.g., c("xxx.tar", "inner.zip", "inner.rar")). If there is/are (an) inner archive(s), but they are unknown, the function will try all until it finds the targetFile. See table in preProcess.

targetFile

Character string giving the path to the eventual file (raster, shapefile, csv, etc.) after downloading and extracting from a zip or tar archive. This is the file before it is passed to postProcess. Currently, the internal checksumming does not checksum the file after it is postProcessed (e.g., cropped/reprojected/masked). Using Cache around prepInputs will do a sufficient job in these cases. See table in preProcess.

destinationPath

Character string of a directory in which to download and save the file that comes from url and is also where the function will look for archive or targetFile. NOTE (still experimental): To prevent repeated downloads in different locations, the user can also set options("reproducible.inputPaths") to one or more local file paths to search for the file before attempting to download. Default for that option is NULL meaning do not search locally.

overwrite

Logical. Should downloading and all the other actions occur even if they pass the checksums or the files are all there.