Learn R Programming

reproducible (version 1.1.1)

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, libPath, standAlone = FALSE)

Arguments

packageVersionFile

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

libPath

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

standAlone

Logical. If TRUE, all packages will be installed and loaded strictly from the libPaths only. If FALSE, all .libPaths will be used to find the correct versions. This can be create dramatically faster installs if the user has a substantial number of the packages already in their personal library. In the case of TRUE, there will be a hidden file place in the libPath directory that lists all the packages that were needed during the Require call. Default FALSE to minimize package installing.

Details

A file is written with the package names and versions of all packages within libPath. 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