zip: Create Zip archives

Description Usage Arguments Details Value See Also

Description

A wrapper for an external zip command to create zip archives.

Usage

1
2
zip(zipfile, files, flags = "-r9X", extras = "",
    zip = Sys.getenv("R_ZIPCMD", "zip"))

Arguments

zipfile

The pathname of the zip file: tilde expansion (see path.expand) will be performed.

files

A character vector of recorded filepaths to be included.

flags

A character string of flags to be passed to the command: see ‘Details’.

extras

An optional character vector: see ‘Details’.

zip

A character string specifying the external command to be used.

Details

On a Unix-alike, the default for zip will by default use the value of R_ZIPCMD, which is set in ‘etc/Renviron’ if an unzip command was found during configuration. On Windows, the default relies on a zip program (for example that from Rtools) being in the path.

The default for flags is that appropriate for zipping up a directory tree in a portable way: see the system-specific help for the zip command for other possibilities.

Argument extras can be used to specify -x or -i followed by a list of filepaths to exclude or include.

Value

The status value returned by the external command, invisibly.

See Also

unzip, unz; further, tar and untar for (un)packing tar archives.

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.