download.file {base} | R Documentation |
Download File from the Internet
Description
This function can be used to download a file from the Internet either
using a helper application such as wget
or by making a direct
socket connection.
Usage
download.file(url, destfile, method = "auto", quiet=FALSE)
Arguments
url |
A character string with the URL of a file to be downloaded. |
destfile |
A character string with the name where the downloaded file is saved. |
method |
Tool to be used for downloading files. Currently
download methods |
quiet |
If |
Details
The function download.file
can be used to download a single
file as described by url
from the internet and store it in
destfile
. It makes a system call to the tool given by
method
, the respective program must be installed on your system
and be in the search path for executables. If method "cp"
is
used, then the url
must start with "file:"
and give the
path to a local file. Method "auto"
(the default) searches for
available tools at runtime.
The url
must start with a type specification such as
"http://"
, "ftp://"
or "file:"
.
Note
Cacheing proxies and firewalls may well not allow method "socket"
socket to be used.