vunzip_bin: Vectorised unzip to raw vectors

vunzip_binR Documentation

Vectorised unzip to raw vectors

Description

Vectorised unzip to raw vectors

Usage

vunzip_bin(x, ...)

Arguments

x

Vector of zip files either by name or by raw vector.

...

Arguments passed on to unzip_bin

Value

Zipper list of member lists of raw vector. Does not attempt to simplify the resulting list of lists of raw vectors. Consistency makes this useful since sub-lists can easily have different file names.

Examples

# Note the trailing dollar in the pattern below. Only matches path names
# ending with `zip` extension.
zippers <- canny.tudor::vunzip_bin(list.files(pattern = "*.zip$"))

# This is how you might iterate the resulting list of lists, of zippers of
# members, using nested `for` loops.
for (i in seq_along(zippers)) {
  members <- zippers[[i]]
  for (j in seq_along(members)) {
    cat(paste(names(zippers)[[i]], names(members)[[j]], sep = ":"),
        length(members[[j]]), "\n")
  }
}

royratcliffe/canny.tudor documentation built on Oct. 17, 2022, 4:17 a.m.