Downloads a file
Downloads a file.
## S3 method for class 'character': downloadFile(url, filename=basename(url), path=NULL, skip=TRUE, overwrite=!skip, ..., binary=TRUE, dropEmpty=TRUE, verbose=FALSE)
characterstring specifying the URL to be downloaded.
- filename, path
characterstrings specifying the local filename and the path of the downloaded file.
TRUE, an already downloaded file is skipped.
TRUE, an already downloaded file is overwritten, otherwise an error is thrown.
- Additional arguments passed to
TRUE, the file is downloaded exactly "as is", that is, byte by byte (strongly recommended).
TRUEand the downloaded file is empty, the file is ignored and
integer, or a
- Returns the local pathname to the downloaded filename,
NULLif no file was downloaded.
download.file is used.
That function may generate an empty file if the URL is not available.
pathname <- downloadFile("http://www.r-project.org/index.html", path="www.r-project.org/") print(pathname)
Looks like there are no examples yet.