download_file: Try various methods to download a file

Description Usage Arguments Value

View source: R/utils.R

Description

Try all possible methods in download.file() (e.g., libcurl, curl, wget, and wininet) and see if any method can succeed. The reason to enumerate all methods is that sometimes the default method does not work, e.g., https://stat.ethz.ch/pipermail/r-devel/2016-June/072852.html.

Usage

1

Arguments

url

The URL of the file.

output

Path to the output file. If not provided, the base name of the URL will be used (query parameters and hash in the URL will be removed).

...

Other arguments to be passed to download.file() (except method).

Value

The integer code 0 for success, or an error if none of the methods work.


yihui/xfun documentation built on Oct. 25, 2018, 11:44 p.m.