Skip to contents

Possible file types include .zip, .gz, .tar, and .tgz

Usage

get_archive_data(url, target_dir, force = FALSE, confirmed = FALSE)

Arguments

url

A character vector representing the full url to the compressed file

target_dir

The directory where the archive file should be downloaded

force

An optional argument which forcefully overwrites existing data

confirmed

If TRUE, the user has confirmed that they have permission to use the data. If FALSE, the function will prompt the user to confirm permission. Setting this to TRUE is useful for reproducible workflows.

Value

NULL, the archive file is unarchived in the target directory

Examples

if (FALSE) { # \dontrun{
data_dir <- file.path(tempdir(), "data")
url <-
 "https://raw.githubusercontent.com/qtalr/qtkit/main/inst/extdata/test_data.zip"
get_archive_data(
 url = url,
 target_dir = data_dir,
 confirmed = TRUE)
} # }