Simple function to download a file from ECOS

download_document(url, file, pause = TRUE)

Arguments

url
A URL from ECOS to download a document
file
File to which the document will be downloaded
pause
Whether to pause for 0.5-3 seconds during scraping

Value

A data_frame with destination and success information

Details

This is a very thin wrapper for download_pdf. Keeping the function here just in case removal would break something else.

As with download_pdf, this function does an auto- rename to convert the URL to the file name, and places it in the destination directory, subd.

See also

download_pdf

Examples

## Not run: ------------------------------------ # res <- download_document("http://ecos.fws.gov/docs/five_year_review/doc3847.pdf", # "~/Downloads/doc3847.pdf") ## ---------------------------------------------