unzip_only: Unzip only files matching a pattern

Description Usage Arguments Examples

Description

Unzip only files matching a pattern

Usage

1
2
unzip_only(zip_file, pattern = NULL, junkpaths = FALSE, ...,
  verbose = getOption("verbose"))

Arguments

zip_file

(character) path to ZIP file

pattern

(character) see utils::glob2rx and stringr::regex

junkpaths

(logical) if TRUE, use only the basename of the stored filepath (discard subdirectory names)

...

further arguments to utils::unzip

verbose

(logical)

Examples

1
2
3
zip_file <- "/Users/dholstius/GitHub/BAAQMD/ARB/tmp/ca_co_ab_dis.zip"
exdir <- unzip_only(zip_file, pattern = "CoAbDis", verbose = TRUE)
show(exdir)

BAAQMD/shptools documentation built on June 29, 2019, 10:27 p.m.