Checks if the example dataset is present. If not, the example dataset is downloaded.
Usage
check_download_data(
where,
data_source,
force_download = FALSE,
dsname = "flowdex_examples"
)
Arguments
- where
Character length one. The path where the example dataset should be looked for.
- data_source
The path to the remote .zip file.
- force_download
Logical. If data should be downloaded anyway. Defaults to FALSE.
- dsname
Character length one. The name of the folder containing the data. Defaults to 'flowdex_examples'.
Value
Logical. FALSE if the remote .zip file was downloaded, TRUE if the example dataset was present and no download was necessary.
Details
Intended to be used within the examples; is downloading and unzipping the folder 'dsname' in the folder specified at argument 'where'.
Examples
td <- tempdir()
data_source <- "https://github.com/bpollner/data/raw/main/flowdex_examples/flowdex_examples.zip"
check_download_data(td, data_source)