extract_data_from_zip: Extract data file from ZIP archive

View source: R/platform_utils.R

extract_data_from_zipR Documentation

Extract data file from ZIP archive

Description

This function downloads a ZIP file, extracts only the data file (.dta or .sav), and cleans up the ZIP file and any non-data files (PDFs, etc.).

Usage

extract_data_from_zip(url, destfile, expected_format, quiet = FALSE)

Arguments

url

URL to download the ZIP file from

destfile

Final destination path for the extracted data file

expected_format

Expected format of the data file ("spss" or "stata")

quiet

Logical indicating whether to show progress

Value

Path to the extracted data file


ces documentation built on Aug. 29, 2025, 5:26 p.m.