Learn R Programming

textreadr (version 1.2.0)

download: Download Documents

Description

This function enables downloading documents by wrapping curl::curl_download().

Usage

download(url, loc = tempdir(), file.out = NULL, ...)

Arguments

url

The download url(s).

loc

Where to put the files.

file.out

Option vector of names matching url. If this is not given download() will try to create a name from url.

...

Other arguments passed to curl::curl_download().

Value

Places a copy of the downloaded document in location specified and returns vector of the locations as string paths.

Examples

Run this code
# NOT RUN {
m <- download(
c('https://cran.r-project.org/web/packages/curl/curl.pdf',
"https://github.com/trinker/textreadr/raw/master/inst/docs/rl10075oralhistoryst002.pdf"),
)

m
# }

Run the code above in your browser using DataLab