Learn R Programming

switchr (version 0.14.8)

cranPkgVersManifest: 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
)

Value

A SessionManifest object

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.

Author

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

Run this code
if (FALSE) {
man = cranPkgVersManifest("devtools", "1.6")
}

Run the code above in your browser using DataLab