unzip: Extract Files from Zip Files

Description Usage Arguments Examples

Description

Unzip extracts a file from a zip archive and puts them into a directory specified by the user or into the temporary directory of the current session.

Usage

1
2
UnZip(zipfile,item,
  dir=tempdir(),package=NULL)

Arguments

zipfile

a character string, the path to the zip file.

item

a character string, full path (from the root of the zip file) to the file to extract.

dir

path to the directory were to place the extracted file.

package

optional package name, if given, the path to the zipfile starts in the packages' root directory.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# Extract American National Election Study of 1948
# It is item "NES1948.POR" in zip file "anes/NES1948.ZIP"
# where this path is relative to the packages'
# root directory.
## Not run: 
nes1948.por <- UnZip("anes/NES1948.ZIP","NES1948.POR",
                     package="codebooks")
nes1948.por

## End(Not run)

mutils documentation built on May 2, 2019, 4:44 p.m.

Related to unzip in mutils...