Untar() can be used to extract GZIP (.tar.gz) files within R.
untar(tarfile, files = NULL, list = FALSE, exdir = ".",
compressed = NA, extras = NULL, verbose = FALSE,
restore_times = TRUE, tar = Sys.getenv("TAR"))
Example:
untar("C:\\FileA.tar.gz", exdir="C:\\FileAContents\\")
See reference manual for full details.
The tar() command can be used to archive files.
tar(tarfile, files = NULL,
compression = c("none", "gzip", "bzip2", "xz"),
compression_level = 6, tar = Sys.getenv("tar"),
extra_flags = "")
See reference manual for full details.