zip_to_disk.frame {disk.frame}R Documentation

'zip_to_disk.frame' is used to read and convert every CSV file within the zip file to disk.frame format

Description

'zip_to_disk.frame' is used to read and convert every CSV file within the zip file to disk.frame format

Usage

zip_to_disk.frame(
  zipfile,
  outdir,
  ...,
  validation.check = FALSE,
  overwrite = TRUE
)

Arguments

zipfile

The zipfile

outdir

The output directory for disk.frame

...

passed to fread

validation.check

should the function perform a check at the end to check for validity of output. It can detect issues with conversion

overwrite

overwrite output directory

Value

a list of disk.frame

See Also

Other ingesting data: csv_to_disk.frame()

Examples

# create a zip file containing a csv
csvfile = tempfile(fileext = ".csv")
write.csv(cars, csvfile)
zipfile = tempfile(fileext = ".zip")
zip(zipfile, csvfile)

# read every file and convert it to a disk.frame
zip.df = zip_to_disk.frame(zipfile, tempfile(fileext = ".df"))

# there is only one csv file so it return a list of one disk.frame
zip.df[[1]]

# clean up
unlink(csvfile)
unlink(zipfile)
delete(zip.df[[1]])

[Package disk.frame version 0.8.3 Index]