downloadFile.character {R.utils} | R Documentation |
Downloads a file
Description
Downloads a file.
Usage
## S3 method for class 'character'
downloadFile(url, filename=basename(url), path=NULL, skip=TRUE, overwrite=!skip, ...,
username=NULL, password=NULL, binary=TRUE, dropEmpty=TRUE, verbose=FALSE)
Arguments
url |
A |
filename , path |
(optional) |
skip |
If |
overwrite |
If |
... |
Additional arguments passed to |
username , password |
|
binary |
If |
dropEmpty |
If |
verbose |
Details
Currently arguments username
and password
are only used
for downloads via URL protocol 'https'. The 'https' protocol requires
that either of 'curl' or 'wget' are available on the system.
Value
Returns the local pathname to the downloaded filename,
or NULL
if no file was downloaded.
Author(s)
Henrik Bengtsson
See Also
Internally download.file
is used.
That function may generate an empty file if the URL is not available.
Examples
## Not run:
pathname <- downloadFile("https://www.r-project.org/index.html", path="www.r-project.org/")
print(pathname)
## End(Not run)