https://github.com/cran/rgbif
Raw File
Tip revision: 59b72670d80bc2fb2a68d847f828808bcc8a6078 authored by John Waller on 23 May 2024, 12:20:02 UTC
version 3.8.0
Tip revision: 59b7267
occ_download_get.Rd
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/occ_download_get.r
\name{occ_download_get}
\alias{occ_download_get}
\title{Get a download from GBIF.}
\usage{
occ_download_get(key, path = ".", overwrite = FALSE, ...)
}
\arguments{
\item{key}{A key generated from a request, like that from \code{occ_download}}

\item{path}{Path to write zip file to. Default: \code{"."}, with a
\code{.zip} appended to the end.}

\item{overwrite}{Will only overwrite existing path if TRUE.}

\item{...}{named curl options passed on to
\link[crul:verb-GET]{crul::verb-GET}. see \code{curl::curl_options()} for curl options}
}
\description{
Get a download from GBIF.
}
\details{
Downloads the zip file to a directory you specify on your machine.
\code{\link[crul:HttpClient]{crul::HttpClient()}} is used internally to write the zip file to
disk. See \link[crul:writing-options]{crul::writing-options}. This function only downloads the file.
See \code{occ_download_import} to open a downloaded file in your R session.
The speed of this function is of course proportional to the size of the
file to download. For example, a 58 MB file on my machine took about
26 seconds.
}
\note{
see \link{downloads} for an overview of GBIF downloads methods

This function used to check for HTTP response content type, but
it has changed enough that we no longer check it. If you run into issues
with this function, open an issue in the GitHub repository.
}
\examples{
\dontrun{
occ_download_get("0000066-140928181241064")
occ_download_get("0003983-140910143529206", overwrite = TRUE)
}
}
\seealso{
Other downloads: 
\code{\link{download_predicate_dsl}},
\code{\link{occ_download_cached}()},
\code{\link{occ_download_cancel}()},
\code{\link{occ_download_dataset_activity}()},
\code{\link{occ_download_datasets}()},
\code{\link{occ_download_import}()},
\code{\link{occ_download_list}()},
\code{\link{occ_download_meta}()},
\code{\link{occ_download_queue}()},
\code{\link{occ_download_wait}()},
\code{\link{occ_download}()}
}
\concept{downloads}
back to top