Learn R Programming

packrat (version 0.9.2)

bundle: Bundle a Packrat Project

Description

Bundle a packrat project, for easy sharing.

Usage

bundle(
  project = NULL,
  file = NULL,
  include.src = TRUE,
  include.lib = FALSE,
  include.bundles = TRUE,
  include.vcs.history = FALSE,
  overwrite = FALSE,
  omit.cran.src = FALSE,
  ...
)

Value

The path (invisibly) to the bundled project.

Arguments

project

The project directory. Defaults to the currently activate project. By default, the current project active under packratMode is checked.

file

The path to write the bundle. By default, we write the bundle to packrat/bundles/<project>-<date>.tar.gz, with <date> as returned by Sys.date().

include.src

Include the packrat sources?

include.lib

Include the packrat private library?

include.bundles

Include other packrat bundle tarballs (as in packrat/bundles/)?

include.vcs.history

Include version control history (ie, .git/ or .svn/ folders)?

overwrite

Boolean; overwrite the file at file if it already exists?

omit.cran.src

Boolean; when TRUE, packages whose sources can be retrieved from CRAN are excluded from the bundle.

...

Optional arguments passed to tar.

Details

The project is bundled as a gzipped tarball (.tar.gz), which can be unbundled either with packrat::unbundle (which restores the project as well), R's own utils::untar, or through most system tar implementations.

The tar binary is selected using the same heuristic as restore.