pkgsnap (version 1.0.0)

snap: Write installed package versions to a file

Description

Base and recommended packages are omitted. Packages that were installed from non-CRAN sources are also included, but you won't be able to restore them with restore.

Usage

snap(to = "packages.csv", lib.loc = NULL, recommended = FALSE)

Arguments

to

File to write the package versions to, defaults to packages.csv. If it is NULL, to output file is created and the result is returned as a data frame.

lib.loc

character vector describing the location of R library trees to search through, or NULL for all known trees (see .libPaths).

recommended

if TRUE then recommended packages will be included in the snapshot.

Value

A two columns data frame, invisibly if it was written to a file.

Details

The output file will have two columns, package name and package version.

Examples

Run this code
# NOT RUN {
snap(to = tmp <- tempfile())

head(read.csv(tmp))
# }

Run the code above in your browser using DataLab