read_zips: read_zips Function to unzip and read csv files. This is used...

read_zipsR Documentation

read_zips Function to unzip and read csv files. This is used in read_csv_or_zip()

Description

read_zips Function to unzip and read csv files. This is used in read_csv_or_zip()

Usage

read_zips(
  input_files,
  workers = 1,
  unzip_dir = file.path(tempdir(), sprintf("csvtemp_%s", sub(".zip", "",
    basename(input_files)))),
  silent = FALSE,
  do_cleanup = TRUE,
  only_list = FALSE
)

Arguments

input_files

A zip, tar or xz file

workers

Workers for data.table::fread

unzip_dir

Where to unzip (if do_cleanup == TRUE, the folder will be deleted)

silent

Show feedback FALSE / TRUE

do_cleanup

Delete temp folder TRUE / FALSE

only_list

Only list the files, but do not read them

Value

Either a list of files or a dataframe after reading the files

Examples

read_zips(system.file("extdata/", "999.zip", package = "jsPsychHelpeR"))

gorkang/jsPsychHelpeR documentation built on Oct. 15, 2024, 8 a.m.