downloadFile.character | R Documentation |
Downloads a file.
## 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)
url |
A |
filename, path |
(optional) |
skip |
If |
overwrite |
If |
... |
Additional arguments passed to |
username, password |
|
binary |
If |
dropEmpty |
If |
verbose |
A |
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.
Returns the local pathname to the downloaded filename,
or NULL
if no file was downloaded.
Henrik Bengtsson
Internally download.file
is used.
That function may generate an empty file if the URL is not available.
## Not run:
pathname <- downloadFile("https://www.r-project.org/index.html", path="www.r-project.org/")
print(pathname)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.