Skip to contents

Download file from the Internet

Usage

download(
  url,
  destfile,
  methods = c("auto", "wget", "libcurl", "curl", "wininet", "internal"),
  quiet = FALSE,
  ...,
  max_tries = 2
)

Arguments

url

a character string (or longer vector for the "libcurl" method) naming the URL of a resource to be downloaded.

destfile

a character string (or vector, see the url argument) with the file path where the downloaded file is to be saved. Tilde-expansion is performed.

methods

Methods to be used for downloading files. Can be "auto", "wget", "libcurl", "curl", "wininet", "internal". Default is "auto", which means to try different download methods.

quiet

If TRUE, suppress status messages (if any), and the progress bar.

...

Other arguments passed to utils::download.file.

max_tries

Number of tries for each download method. Default is 2.