View source: R/archive_extract.R
archive_extract | R Documentation |
Extract contents of an archive to a directory
archive_extract(
archive,
dir = ".",
files = NULL,
options = character(),
strip_components = 0L
)
archive |
|
dir |
|
files |
|
options |
|
strip_components |
Remove the specified number of leading path elements. Pathnames with fewer elements will be silently skipped. |
If files
is NULL
(the default) all files will be extracted.
The filenames extracted (invisibly).
a <- system.file(package = "archive", "extdata", "data.zip")
d <- tempfile()
# When called with default arguments extracts all files in the archive.
archive_extract(a, d)
list.files(d)
unlink(d)
# Can also specify one or more files to extract
d <- tempfile()
archive_extract(a, d, c("iris.csv", "airquality.csv"))
list.files(d)
unlink(d)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.