Download a species' ECOS page

download_species_page(url, file, overwrite = FALSE)

Arguments

url
The URL of the HTML page to download
file
The file to which the HTML will be written
overwrite
Whether to overwrite pre-existing file

Value

A data_frame with four variables:

url
The URL that was downloaded or attempted
dest
The file to which the HTML was written
success
Whether the download was a success or failed
htmlCheck
Whether the downloaded file is an HTML [bool]

Details

A wrapper around GET with several checks to make downloads more likely / robust.

Examples

## Not run: ------------------------------------ # get_species_url("Helianthus paradoxus") %>% # download_species_page("~/Downloads/HELPAR_2016-12-08.html") ## ---------------------------------------------