temp_unzip: Unzip a Data File and Read It

Description Usage Arguments Details

View source: R/temp_unzip.R

Description

SafeGraph patterns files come in .csv.gz format. temp_unzip will unzip the file, read it in using fun (usually fread), and then delete the unzipped .csv file.

Usage

1
temp_unzip(filename, fun = data.table::fread, ...)

Arguments

filename

The filename of the zip file to be unzipped.

fun

The function to use to read in the resulting unzipped data file.

...

Additional arguments to be passed to fun. Often, this is select to only read in some of the variables.

Details

I stole this function from a StackExchange answer many years ago and have copied it so many times I no longer know where it came from. Every day we offer thanks to the author.


NickCH-K/SafeGraphR documentation built on May 25, 2020, 1:55 a.m.