Learn R Programming

Require (version 0.0.6)

pkgSnapshot: Take a snapshot of all the packages and version numbers

Description

This can be used later by installVersions to install or re-install the correct versions.

Usage

pkgSnapshot(
  packageVersionFile = "packageVersions.txt",
  libPaths,
  standAlone = FALSE
)

Arguments

packageVersionFile

A filename to save the packages and their currently installed version numbers. Defaults to ".packageVersions.txt".

libPaths

The path to the local library where packages are installed. Defaults to the .libPaths()[1].

standAlone

Logical. If TRUE, all packages will be installed to and loaded from the libPaths only. If FALSE, then libPath will be prepended to .libPaths() during the Require call, resulting in shared packages, i.e., it will include the user's default package folder(s). This can be create dramatically faster installs if the user has a substantial number of the packages already in their personal library. Default FALSE to minimize package installing.

Details

A file is written with the package names and versions of all packages within libPaths. This can later be passed to Require.

Examples

Run this code
# NOT RUN {
pkgSnapFile <- tempfile()
pkgSnapshot(pkgSnapFile, .libPaths()[1])
data.table::fread(pkgSnapFile)

# }

Run the code above in your browser using DataLab