Unzip files that are not already unzipped in the object and, if everything went well and is indicated in the parameter, delete the unzipped files.
Arguments
- ac
An
acs_5yrobject.- subdir
NULL/'year'/'area', output subdir.
- delete_zip
A boolean, delete zip files if correctly unzipped.
Details
In the subdir parameter, the values NULL, 'year' or 'area' can be indicated.
With NULL it does not create any subdirs, with 'year' it creates them by years
of files and with 'area' it creates them by areas.
See also
Other data download functions:
acs_5yr(),
download_selected_files(),
get_area_file_names(),
get_area_groups(),
get_area_years(),
get_areas(),
get_selected_file_names(),
get_too_heavy_file_names(),
select_area_files()
Examples
dir <- tempdir()
source_dir <- system.file("extdata/acs_5yr", package = "geogenr")
files <- list.files(source_dir, "*.zip", full.names = TRUE)
file.copy(from = files, to = dir, overwrite = TRUE)
#> [1] TRUE TRUE
ac <- acs_5yr(dir)
files <- ac |>
unzip_files()
