| Line 13... |
Line 13... |
| 13 |
This function can be used to download a file from the Internet.
|
13 |
This function can be used to download a file from the Internet.
|
| 14 |
}
|
14 |
}
|
| 15 |
\usage{
|
15 |
\usage{
|
| 16 |
download.file(url, destfile, method, quiet = FALSE, mode = "w",
|
16 |
download.file(url, destfile, method, quiet = FALSE, mode = "w",
|
| 17 |
cacheOK = TRUE,
|
17 |
cacheOK = TRUE,
|
| 18 |
extra = getOption("download.file.extra"), \dots)
|
18 |
extra = getOption("download.file.extra"),
|
| - |
|
19 |
headers = NULL, \dots)
|
| 19 |
}
|
20 |
}
|
| 20 |
\arguments{
|
21 |
\arguments{
|
| 21 |
\item{url}{a \code{\link{character}} string (or longer vector e.g.,
|
22 |
\item{url}{a \code{\link{character}} string (or longer vector e.g.,
|
| 22 |
for the \code{"libcurl"} method) naming the URL of a resource to be
|
23 |
for the \code{"libcurl"} method) naming the URL of a resource to be
|
| 23 |
downloaded.}
|
24 |
downloaded.}
|
| Line 46... |
Line 47... |
| 46 |
\item{cacheOK}{logical. Is a server-side cached value acceptable?}
|
47 |
\item{cacheOK}{logical. Is a server-side cached value acceptable?}
|
| 47 |
|
48 |
|
| 48 |
\item{extra}{character vector of additional command-line arguments for
|
49 |
\item{extra}{character vector of additional command-line arguments for
|
| 49 |
the \code{"wget"} and \code{"curl"} methods.}
|
50 |
the \code{"wget"} and \code{"curl"} methods.}
|
| 50 |
|
51 |
|
| - |
|
52 |
\item{headers}{named character vector of HTTP headers to use in HTTP
|
| - |
|
53 |
requests. It is ignored for non-HTTP URLs. The \code{User-Agent}
|
| - |
|
54 |
header, coming from the \code{HTTPUserAgent} option (see
|
| - |
|
55 |
\code{\link{options}}) is used as the first header, automatically.}
|
| - |
|
56 |
|
| 51 |
\item{\dots}{allow additional arguments to be passed, unused.}
|
57 |
\item{\dots}{allow additional arguments to be passed, unused.}
|
| 52 |
}
|
58 |
}
|
| 53 |
\details{
|
59 |
\details{
|
| 54 |
The function \code{download.file} can be used to download a single
|
60 |
The function \code{download.file} can be used to download a single
|
| 55 |
file as described by \code{url} from the internet and store it in
|
61 |
file as described by \code{url} from the internet and store it in
|