gzfile <- system.file("extdata", "ex20101224.TEST_ITCH_50.gz", package = "RITCH")
file <- system.file("extdata", "ex20101224.TEST_ITCH_50", package = "RITCH")
# uncompress file
(outfile <- gunzip_file(gzfile, "tmp"))
file.info(outfile)
unlink(outfile)
# compress file
(outfile <- gzip_file(file))
file.info(outfile)
unlink(outfile)
Run the code above in your browser using DataLab