cranPkgVersManifest: cranPkgVersManifest

View source: R/crandbtmp.R

cranPkgVersManifestR Documentation

cranPkgVersManifest

Description

Create a Pkg manifest which points to tarballs representing a particular version of a CRAN package and versions of its (recursive) dependencies that were contemporary on the first or last day the specified package version resided on CRAN

Usage

cranPkgVersManifest(
  pkg,
  vers,
  earliest = TRUE,
  cur_avail = available.packages(),
  verbose = FALSE,
  suggests = c("direct", "none"),
  delay = 1,
  erronfail = TRUE
)

Arguments

pkg

The package on which to base the generated manifest

vers

The version of pkg to construct the cohort around. Note this must match the the version string exactly, i.e. 1.3.1 and 1.3-1 are *not* equivalent.

earliest

Should the package dependencies be contemporary with the first (TRUE) or last (FALSE) day the specified package version was (the latest version) on CRAN?

cur_avail

The output from available.packages(). Used to identify whether the necessary version is in the CRAN archive or normal repository

verbose

Should debugging information about the recursive traversal of package dependencies be printed (defaults to FALSE).

suggests

Which Suggests'ed packages should be included. Currently supported possibilites are direct, indicating Suggestions of pkg should be included, and none, indicating that no Suggests'ed packages should be counted.

delay

Number of seconds to delay between successive REST calls to the crandb database. Defaults to 1 second

erronfail

how should connection errors be handled. TRUE (the default) throws an error, NA throws a warning, FALSE emits a message.

Value

A SessionManifest object

Note

Some packages retain the same version on CRAN for long periods of time. The cohort in the manifest represents a gross proxy for the cohort used in conjunction within an analysis which used a the vers version of the specified package. In general it will *not* perfectly recreate the set of package versions originally used.

Author(s)

Gabriel Becker

References

"Gabor Csardi" (2014). crandb: Query the unofficial CRAN metadata database. R package version 1.0.0. https://github.com/metacran/crandb

Becker G, Barr C, Gentleman R, Lawrence M; Enhancing Reproducibility and Collaboration via Management of R Package Cohorts. Journal of Statistical Software, 81(1). 2017. doi: 10.18637/jss.v082.i01

Examples

## Not run: 
man = cranPkgVersManifest("devtools", "1.6")

## End(Not run)

gmbecker/switchr documentation built on Feb. 24, 2023, 12:59 p.m.