zip.file.extract            package:utils            R Documentation

_E_x_t_r_a_c_t _F_i_l_e _f_r_o_m _a _Z_i_p _A_r_c_h_i_v_e

_D_e_s_c_r_i_p_t_i_o_n:

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

_U_s_a_g_e:

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

_A_r_g_u_m_e_n_t_s:

    file: A file name. (If a path is given, see 'Note'.)

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

   unzip: character string: the method to be used, an empty string
          indicates '"internal"'.

_D_e_t_a_i_l_s:

     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 be extracted to
     the directory given by 'tempdir', overwriting any existing file of
     that name.

_V_a_l_u_e:

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

_N_o_t_e:

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

     This is a helper function for 'help', 'example' and 'data'.  As
     such, it handles file paths in an unusual way.  Any path component
     of 'zipname' is ignored, and the path to 'file' is used only to
     determine the directory within which to find 'zipname'.

