This can be used later by installVersions to install or re-install the correct versions.
pkgSnapshot(packageVersionFile, libPath, standAlone = FALSE)
| packageVersionFile | A filename to save the packages and their currently
installed version numbers. Defaults to |
|---|---|
| libPath | The path to the local library where packages are installed. Defaults to the .libPaths()[1] |
| standAlone | Logical. If |
A file is written with the package names and versions of all packages within libPath.
This can later be passed to Require.
pkgSnapFile <- tempfile() pkgSnapshot(pkgSnapFile, .libPaths()[1])#> instPkgs instVers #> 1: archivist 2.3.1 #> 2: assertthat 0.2.0 #> 3: backports 1.1.2 #> 4: BH 1.66.0-1 #> 5: bindr 0.1.1 #> --- #> 127: parallel 3.4.4 #> 128: stats 3.4.4 #> 129: tcltk 3.4.4 #> 130: tools 3.4.4 #> 131: utils 3.4.4#> instPkgs instVers #> 1: archivist 2.3.1 #> 2: assertthat 0.2.0 #> 3: backports 1.1.2 #> 4: BH 1.66.0-1 #> 5: bindr 0.1.1 #> --- #> 127: parallel 3.4.4 #> 128: stats 3.4.4 #> 129: tcltk 3.4.4 #> 130: tools 3.4.4 #> 131: utils 3.4.4