Extract Archive Contents
Extract contents of an archive to a directory. Requires that the archive
package is available.
extract_archive(file, destdir = tempdir())
file
: 'character' string. File path to the archive.destdir
: 'character' string. Destination directory to extract files to. It will be created if necessary. Defaults to the temporary directory.Invisibly returns the extracted path(s).
files <- system.file("extdata", "test.zip", package = "inldata") |> extract_archive() unlink(files)
J.C. Fisher, U.S. Geological Survey, Idaho Water Science Center
Useful links