File: download_file.Rd

package info (click to toggle)
r-cran-xfun 0.20-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 680 kB
  • sloc: ansic: 242; sh: 22; makefile: 2
file content (28 lines) | stat: -rw-r--r-- 916 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/io.R
\name{download_file}
\alias{download_file}
\title{Try various methods to download a file}
\usage{
download_file(url, output = url_filename(url), ...)
}
\arguments{
\item{url}{The URL of the file.}

\item{output}{Path to the output file. By default, it is determined by
\code{\link{url_filename}()}.}

\item{...}{Other arguments to be passed to \code{\link{download.file}()}
(except \code{method}).}
}
\value{
The integer code \code{0} for success, or an error if none of the
  methods work.
}
\description{
Try all possible methods in \code{\link{download.file}()} (e.g.,
\code{libcurl}, \code{curl}, \code{wget}, and \code{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.,
\url{https://stat.ethz.ch/pipermail/r-devel/2016-June/072852.html}.
}