download: Download a file from the Internet

Description Usage Arguments Details Value Note Examples

View source: R/download.R

Description

Download a file from the Internet

Usage

1
download(url, destfile, quiet = FALSE, ...)

Arguments

url

character(1). URL.

destfile

character(1). Destination file.

quiet

logical(1). Suppress status messages.

...

Passthrough arguments to utils::download.file().

Details

Unlike utils::download.file(), intentionally errors on any download failure. Automatically sets a long time out internally via options(timeout = 9999L), to avoid download issues related to timeout configuration in Rprofile.

Value

character(1). Destination file path. Note that this differs from download.file, which returns a status code (e.g. 0 for success) instead.

Note

Updated 2021-08-13.

Examples

1
2
3
4
5
url <- "https://bioconductor.org/bioc-version"
destfile <- "bioc-version.txt"
out <- download(url = url, destfile = destfile, quiet = TRUE)
print(out)
file.remove(out)

acidgenomics/AcidBase documentation built on Sept. 10, 2021, 1:27 a.m.