zip.file.extract            package:base            R Documentation

Extract File from a Zip Archive

Description:

     This will extract the file named 'file' from the zip archive, if
     possible, and write it in a temporary location.

Usage:

     zip.file.extract(file, zipname = "R.zip")

Arguments:

    file: A file name.

 zipname: The file name of a 'zip' archive, including the '".zip"'
          extension if required.

Details:

     The method used is selected by 'options(unzip=)'. All platforms
     support an '"internal"' unzip: this is the default under Windows
     and the fall-back under Unix if no 'unzip' program was found
     during configuration and 'R_UNZIPCMD' is not set.

     The file will be extracted if it is in the archive and any
     required 'unzip' utility is available.  It will probably be
     extracted to the directory given by 'tempdir', overwriting an
     existing file of that name.

Value:

     The name of the original or extracted file.  Success is indicated
     by returning a different name.

Note:

     The '"internal"' method is very simple, and will not set file
     dates.

