download_data: Download data from URL to local destination.

Description Usage Arguments Value Examples

View source: R/download_data.R

Description

Function provides an option to specify the data you want to download using URLs and desired filenames, or you can download files from our [Data Source List](https://github.com/TrashBirdEcology/USAvian/blob/master/data/data_sources.csv) and use the abbreviations to quickly download all desired data to file.

Usage

1
download_data(dir = NULL, url = NULL, fn = NULL, abbrevs = NULL)

Arguments

dir

(optional) Directory for storing the downloaded data. Defaults to 'data/data-raw'

url

(optional) URL(s) character, single or vector, for data source locations.

fn

(optional) Filename(s) corresponding to the name local filename of the downloaded data (do not include the extension).

abbrevs

(Preferred) Abbreviations of select datasets (see col "abbrev" 'data("data_sources")')). Specifying this parameter is the preferred, and easier, method for downloading relevant data sources.

Value

NA. Files downloaded to local directory (as defined by 'dir' parameter.)

Examples

1
2
3
4
\donotrun{
# Download the persistent Bird Conservation Regions (BCR) compressed file.
download_data(abbrev="bcr_persistent")
}

TrashBirdEcology/USAvian documentation built on Feb. 27, 2021, 9:19 p.m.