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

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]]
#> path: "C:\Users\RTX2080\AppData\Local\Temp\RtmpInritK\file187c1d9666ec.df/Users/RTX2080/AppData/Local/Temp/RtmpInritK/file187c725c4b4.csv" #> nchunks: 6 #> nrow (at source): 50 #> ncol (at source): 3 #> nrow (post operations): ??? #> ncol (post operations): ???
# clean up unlink(csvfile) unlink(zipfile) delete(zip.df[[1]])