Learn R Programming

curl (version 0.4)

curl_download: Download file

Description

Libcurl implementation of C_download (the "internal" download method). Designed to behave similar to download.file.

Usage

curl_download(url, destfile, quiet = FALSE, mode = "w")

Arguments

url
A character string naming the URL of a resource to be downloaded.
destfile
A character string with the name where the downloaded file is saved. Tilde-expansion is performed.
quiet
If TRUE, suppress status messages (if any), and the progress bar.
mode
A character string specifying the mode with which to write the file. Useful values are "w", "wb" (binary), "a" (append) and "ab".

Examples

Run this code
download large file
url <- "http://www2.census.gov/acs2011_5yr/pums/csv_pus.zip"
tmp <- tempfile()
curl_download(url, tmp)

Run the code above in your browser using DataLab