Downloads a file from a given URL and saves it to a specified destination.
Examples
if (interactive()) {
test_url <- paste0("https://raw.githubusercontent.com/rudeboybert/",
"fivethirtyeight/master/data-raw/drug-use-by-age/drug-use-by-age.csv")
test_dir <- "data/test"
download_data(test_url, test_dir)
}