This can be used later by installVersions to install or re-install the correct versions.

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

pkgSnapFile <- tempfile() pkgSnapshot(pkgSnapFile, .libPaths()[1])
#> There is no /tmp/RtmpVW10tZ/reproducible/cache/.Require/_usr_local_lib_R_site-library._packageVersionsAuto.txt and standAlone is FALSE. This snapshot will not be accurate because it will include all packages in /usr/local/lib/R/site-library, /usr/lib/R/site-library, /usr/lib/R/library
#> instPkgs instVers #> abind abind 1.4-5 #> acepack acepack 1.4.1 #> ade4 ade4 1.7-13 #> adegenet adegenet 2.1.1 #> amc amc 0.1.5.9000 #> animation animation 2.6 #> ape ape 5.3 #> aqp aqp 1.17 #> archivist archivist 2.3.2 #> AsioHeaders AsioHeaders 1.12.1-1 #> askpass askpass 1.1 #> assertthat assertthat 0.2.0 #> backports backports 1.1.3 #> base64enc base64enc 0.1-4 #> BH BH 1.69.0-1 #> bibtex bibtex 0.4.2 #> bigmemory bigmemory 4.5.33 #> bigmemory.sri bigmemory.sri 0.1.3 #> bindr bindr 0.1.1 #> bindrcpp bindrcpp 0.2.2 #> bit bit 1.1-14 #> bit64 bit64 0.9-7 #> bitops bitops 1.0-6 #> blob blob 1.1.1 #> blogdown blogdown 0.11 #> bookdown bookdown 0.9 #> brew brew 1.0-6 #> broom broom 0.5.1 #> Cairo Cairo 1.5-9 #> callr callr 3.2.0 #> car car 3.0-2 #> carData carData 3.0-2 #> caret caret 6.0-81 #> caTools caTools 1.17.1.2 #> cellranger cellranger 1.1.0 #> checkmate checkmate 1.9.1 #> CircStats CircStats 0.2-6 #> citr citr 0.3.0 #> classInt classInt 0.3-1 #> cli cli 1.0.1.9000 #> clipr clipr 0.5.0 #> clisymbols clisymbols 1.2.0 #> coda coda 0.19-2 #> colorRamps colorRamps 2.3 #> colorspace colorspace 1.4-0 #> commonmark commonmark 1.7 #> covr covr 3.2.1 #> cowplot cowplot 0.9.4 #> crancache crancache 0.0.0.9000 #> cranlike cranlike 1.0.2 #> crayon crayon 1.3.4 #> crosstalk crosstalk 1.0.0 #> crul crul 0.7.0 #> curl curl 3.3 #> CVST CVST 0.2-2 #> cyclocomp cyclocomp 1.1.0 #> data.table data.table 1.12.0 #> DBI DBI 1.0.0 #> ddalpha ddalpha 1.3.8 #> debugme debugme 1.1.0 #> deldir deldir 0.1-16 #> DEoptim DEoptim 2.2-4 #> DEoptimR DEoptimR 1.0-8 #> desc desc 1.2.0 #> deSolve deSolve 1.21 #> devtools devtools 2.0.1 #> DiagrammeR DiagrammeR 1.0.0 #> dichromat dichromat 2.0-0 #> digest digest 0.6.18 #> dismo dismo 1.1-4 #> doParallel doParallel 1.0.14 #> dotCall64 dotCall64 1.0-0 #> downloader downloader 0.4 #> dplyr dplyr 0.8.0.1 #> DRR DRR 0.0.3 #> DT DT 0.5 #> e1071 e1071 1.7-0.1 #> ellipsis ellipsis 0.1.0 #> evaluate evaluate 0.13 #> expm expm 0.999-3 #> fansi fansi 0.4.0 #> fastdigest fastdigest 0.6-3 #> fasterize fasterize 1.0.0 #> fastmatch fastmatch 1.1-1 #> fastshp fastshp 0.1-2 #> ff ff 2.2-14 #> ffbase ffbase 0.12.7 #> flexdashboard flexdashboard 0.5.1.1 #> flock flock 0.7 #> FNN FNN 1.1.3 #> forcats forcats 0.4.0 #> foreach foreach 1.4.4 #> Formula Formula 1.2-3 #> fpCompare fpCompare 0.2.2 #> fs fs 1.2.6 #> future future 1.12.0 #> gbm gbm 2.1.5 #> gdalUtils gdalUtils 2.0.1.14 #> gdata gdata 2.18.0 #> gdistance gdistance 1.2-2 #> gdtools gdtools 0.1.7 #> generics generics 0.0.2 #> GenSA GenSA 1.1.7 #> geojson geojson 0.3.2 #> geojsonio geojsonio 0.6.0 #> geojsonlint geojsonlint 0.3.0 #> geometry geometry 0.4.0 #> geosphere geosphere 1.5-7 #> getPass getPass 0.2-2 #> ggplot2 ggplot2 3.1.0 #> ggthemes ggthemes 4.1.0 #> gh gh 1.0.1 #> git2r git2r 0.25.1 #> globals globals 0.12.4 #> glue glue 1.3.1 #> gmailr gmailr 0.7.1 #> gmodels gmodels 2.18.1 #> goftest goftest 1.1-1 #> goodpractice goodpractice 1.0.2 #> googleAuthR googleAuthR 0.7.0 #> googledrive googledrive 0.1.3 #> googleID googleID 0.0.9001 #> gower gower 0.2.0 #> gplots gplots 3.0.1.1 #> grainscape grainscape 0.3.0.9000 #> gridBase gridBase 0.4-7 #> gridExtra gridExtra 2.3 #> gstat gstat 2.0-0 #> gtable gtable 0.2.0 #> gtools gtools 3.8.1 #> haven haven 2.1.0 #> hexbin hexbin 1.27.2 #> highlight highlight 0.4.7.2 #> highr highr 0.7 #> Hmisc Hmisc 4.2-0 #> hms hms 0.4.2 #> htmlTable htmlTable 1.13.1 #> htmltools htmltools 0.3.6 #> htmlwidgets htmlwidgets 1.3 #> httpcode httpcode 0.2.0 #> httpuv httpuv 1.5.0 #> httr httr 1.4.0 #> hunspell hunspell 3.0 #> igraph igraph 1.2.4 #> influenceR influenceR 0.1.0 #> ini ini 0.3.1 #> intervals intervals 0.15.1 #> ipred ipred 0.9-8 #> ISOcodes ISOcodes 2019.02.13 #> iterators iterators 1.0.10 #> janeaustenr janeaustenr 0.1.5 #> jpeg jpeg 0.1-8 #> jqr jqr 1.1.0 #> jsonlite jsonlite 1.6 #> jsonvalidate jsonvalidate 1.0.0 #> kernlab kernlab 0.9-27 #> knitr knitr 1.22 #> koRpus koRpus 0.11-5 #> koRpus.lang.en koRpus.lang.en 0.1-2 #> labeling labeling 0.3 #> LandR LandR 0.0.1.9005 #> later later 0.8.0.9000 #> latticeExtra latticeExtra 0.6-28 #> lava lava 1.6.5 #> lazyeval lazyeval 0.2.2 #> leaflet leaflet 2.0.2 #> leaflet.extras leaflet.extras 1.0.0 #> LearnBayes LearnBayes 2.15.1 #> lintr lintr 1.0.3.9000 #> listenv listenv 0.7.0 #> lme4 lme4 1.1-21 #> lpSolve lpSolve 5.6.13 #> lubridate lubridate 1.7.4 #> magic magic 1.5-9 #> magick magick 2.0 #> magrittr magrittr 1.5 #> map map 0.0.1 #> mapdata mapdata 2.3.0 #> maps maps 3.3.0 #> maptools maptools 0.9-5 #> markdown markdown 0.9 #> MatrixModels MatrixModels 0.4-1 #> matrixStats matrixStats 0.54.0 #> memoise memoise 1.1.0 #> microbenchmark microbenchmark 1.4-6 #> mime mime 0.6.1 #> miniCRAN miniCRAN 0.2.11 #> miniUI miniUI 0.1.1.1 #> minqa minqa 1.2.4 #> mmap mmap 0.6-17 #> ModelMetrics ModelMetrics 1.2.2 #> move move 3.1.0 #> moveVis moveVis 0.9.9 #> MuMIn MuMIn 1.43.1 #> munsell munsell 0.5.0 #> mvtnorm mvtnorm 1.0-10 #> NetLogoR NetLogoR 0.3.5 #> nloptr nloptr 1.2.1 #> NMF NMF 0.21.0 #> numDeriv numDeriv 2016.8-1 #> openssl openssl 1.2.2 #> openxlsx openxlsx 4.1.0 #> optimx optimx 2018-7.10 #> ore ore 1.6.2 #> packrat packrat 0.5.0 #> parsedate parsedate 1.1.3 #> pbapply pbapply 1.4-0 #> pbkrtest pbkrtest 0.4-7 #> pemisc pemisc 0.0.1.9002 #> permute permute 0.9-5 #> pillar pillar 1.3.1 #> pixmap pixmap 0.4-11 #> pkgbuild pkgbuild 1.0.2 #> pkgconfig pkgconfig 2.0.2 #> pkgdown pkgdown 1.3.0 #> pkgload pkgload 1.0.2 #> pkgmaker pkgmaker 0.27 #> PKI PKI 0.1-5.1 #> plogr plogr 0.2.0 #> plotKML plotKML 0.5-9 #> plotrix plotrix 3.7-4 #> pls pls 2.7-0 #> plyr plyr 1.8.4 #> png png 0.1-7 #> polyclip polyclip 1.10-0 #> praise praise 1.0.0 #> prettymapr prettymapr 0.2.2 #> prettyunits prettyunits 1.0.2 #> processx processx 3.3.0 #> prodlim prodlim 2018.04.18 #> profvis profvis 0.3.5 #> progress progress 1.2.0.9000 #> promises promises 1.0.1 #> protolite protolite 1.8 #> pryr pryr 0.1.4 #> ps ps 1.3.0 #> pso pso 1.0.3 #> purrr purrr 0.3.2 #> quantreg quantreg 5.38 #> quickPlot quickPlot 0.1.6 #> R.devices R.devices 2.16.0 #> R.methodsS3 R.methodsS3 1.7.1 #> R.oo R.oo 1.22.0 #> R.utils R.utils 2.8.0 #> R6 R6 2.4.0 #> RandomFields RandomFields 3.3.6 #> RandomFieldsUtils RandomFieldsUtils 0.5.3 #> randomForest randomForest 4.6-14 #> rappdirs rappdirs 0.3.1 #> raster raster 2.8-19 #> rasterVis rasterVis 0.45 #> rcmdcheck rcmdcheck 1.3.2 #> RColorBrewer RColorBrewer 1.1-2 #> Rcpp Rcpp 1.0.1 #> RcppArmadillo RcppArmadillo 0.9.200.7.1 #> RcppEigen RcppEigen 0.3.3.5.0 #> RcppProgress RcppProgress 0.4.1 #> RcppRoll RcppRoll 0.3.0 #> RCurl RCurl 1.95-4.12 #> readr readr 1.3.1 #> readxl readxl 1.3.1 #> recipes recipes 0.1.4 #> RefManageR RefManageR 1.2.0 #> registry registry 0.5-1 #> rematch rematch 1.0.1 #> rematch2 rematch2 2.0.1 #> remotes remotes 2.0.2 #> reportr reportr 1.3.0 #> reproducible reproducible 0.2.7.9002 #> reshape reshape 0.8.8 #> reshape2 reshape2 1.4.3 #> revdepcheck revdepcheck 1.0.0.9000 #> rex rex 1.1.2 #> rgdal rgdal 1.4-3 #> rgenoud rgenoud 5.8-3.0 #> rgeos rgeos 0.4-2 #> rgexf rgexf 0.15.3 #> rhub rhub 1.0.2 #> rio rio 0.5.16 #> rJava rJava 0.9-10 #> rjson rjson 0.2.20 #> RJSONIO RJSONIO 1.3-1.1 #> rlang rlang 0.3.1 #> rmapshaper rmapshaper 0.4.1 #> rmarkdown rmarkdown 1.12 #> rngtools rngtools 1.3.1 #> robustbase robustbase 0.93-3 #> ROCR ROCR 1.0-7 #> Rook Rook 1.1-1 #> rosm rosm 0.2.4 #> roxygen2 roxygen2 6.1.0.9000 #> rprojroot rprojroot 1.3-2 #> RSAGA RSAGA 1.3.0 #> rsconnect rsconnect 0.8.13 #> Rserve Rserve 1.7-3 #> RSQLite RSQLite 2.1.1 #> RStoolbox RStoolbox 0.2.4 #> rstudioapi rstudioapi 0.9.0 #> rts rts 1.0-49 #> rversions rversions 1.0.3 #> scales scales 1.0.0 #> scam scam 1.2-3 #> scatterplot3d scatterplot3d 0.3-41 #> SDMTools SDMTools 1.1-221 #> segmented segmented 0.5-3.0 #> seqinr seqinr 3.4-5 #> servr servr 0.13 #> sessioninfo sessioninfo 1.1.1 #> sf sf 0.7-3 #> sfsmisc sfsmisc 1.1-3 #> shapefiles shapefiles 0.7 #> shiny shiny 1.2.0 #> shinyBS shinyBS 0.61 #> shinycssloaders shinycssloaders 0.2.0 #> shinydashboard shinydashboard 0.7.1 #> shinyjs shinyjs 1.0 #> shinyloadtest shinyloadtest 1.0.0 #> shinyWidgets shinyWidgets 0.4.7 #> simecol simecol 0.8-12 #> snow snow 0.4-3 #> SnowballC SnowballC 0.6.0 #> snowfall snowfall 1.84-6.1 #> soma soma 1.1.1 #> sourcetools sourcetools 0.1.7 #> sp sp 1.3-1 #> spacetime spacetime 1.2-2 #> SpaDES SpaDES 2.0.3 #> SpaDES.addins SpaDES.addins 0.1.2 #> SpaDES.core SpaDES.core 0.2.5 #> SpaDES.shiny SpaDES.shiny 0.1.0.9014 #> SpaDES.tools SpaDES.tools 0.3.1.9000 #> spam spam 2.2-2 #> SparseM SparseM 1.77 #> spatial.tools spatial.tools 1.6.0 #> spatstat spatstat 1.58-2 #> spatstat.data spatstat.data 1.4-0 #> spatstat.utils spatstat.utils 1.13-0 #> spData spData 0.3.0 #> spdep spdep 1.0-2 #> spelling spelling 2.1 #> splancs splancs 2.01-40 #> SQUAREM SQUAREM 2017.10-1 #> stopwords stopwords 0.9.0 #> stringdist stringdist 0.9.5.1 #> stringi stringi 1.4.3 #> stringr stringr 1.4.0 #> svglite svglite 1.2.1 #> sylly sylly 0.1-5 #> sylly.en sylly.en 0.1-3 #> sys sys 3.1 #> tcltk2 tcltk2 1.2-11 #> tensor tensor 1.5 #> testthat testthat 2.0.1 #> tibble tibble 2.1.1 #> tidyr tidyr 0.8.3 #> tidyselect tidyselect 0.2.5 #> tidytext tidytext 0.2.0 #> tiler tiler 0.2.1 #> timeDate timeDate 3043.102 #> TimeWarp TimeWarp 1.0.15 #> tinytex tinytex 0.11 #> tkrplot tkrplot 0.0-24 #> tokenizers tokenizers 0.2.1 #> triebeard triebeard 0.3.0 #> udapi udapi 0.1.3 #> units units 0.6-2 #> urltools urltools 1.7.2 #> usethis usethis 1.4.0 #> utf8 utf8 1.1.4 #> uuid uuid 0.1-2 #> V8 V8 2.1 #> vegan vegan 2.5-4 #> velox velox 0.2.0 #> versions versions 0.3 #> VGAM VGAM 1.1-1 #> viridis viridis 0.5.1 #> viridisLite viridisLite 0.3.0 #> visNetwork visNetwork 2.0.5 #> visualTest visualTest 1.0.0 #> websocket websocket 0.0.0.9001 #> whisker whisker 0.3-2 #> whoami whoami 1.2.0 #> withr withr 2.1.2 #> wordcountaddin wordcountaddin 0.3.0.9000 #> xfun xfun 0.5 #> xlsx xlsx 0.6.1 #> xlsxjars xlsxjars 0.6.1 #> XML XML 3.98-1.19 #> xml2 xml2 1.2.0 #> xmlparsedata xmlparsedata 1.0.2 #> xopen xopen 1.0.0 #> xtable xtable 1.8-3 #> xts xts 0.11-2 #> yaml yaml 2.2.0 #> yesno yesno 0.1.0 #> zip zip 2.0.1 #> zoo zoo 1.8-4 #> base base 3.5.3 #> boot boot 1.3-20 #> class class 7.3-15 #> cluster cluster 2.0.7-1 #> codetools codetools 0.2-16 #> compiler compiler 3.5.3 #> datasets datasets 3.5.3 #> foreign foreign 0.8-70 #> graphics graphics 3.5.3 #> grDevices grDevices 3.5.3 #> grid grid 3.5.3 #> KernSmooth KernSmooth 2.23-15 #> lattice lattice 0.20-38 #> MASS MASS 7.3-51.1 #> Matrix Matrix 1.2-16 #> methods methods 3.5.3 #> mgcv mgcv 1.8-27 #> nlme nlme 3.1-137 #> nnet nnet 7.3-12 #> parallel parallel 3.5.3 #> rpart rpart 4.1-13 #> spatial spatial 7.3-11 #> splines splines 3.5.3 #> stats stats 3.5.3 #> stats4 stats4 3.5.3 #> survival survival 2.43-3 #> tcltk tcltk 3.5.3 #> tools tools 3.5.3 #> translations translations 3.5.3 #> utils utils 3.5.3
data.table::fread(pkgSnapFile)
#> instPkgs instVers #> 1: abind 1.4-5 #> 2: acepack 1.4.1 #> 3: ade4 1.7-13 #> 4: adegenet 2.1.1 #> 5: amc 0.1.5.9000 #> --- #> 423: survival 2.43-3 #> 424: tcltk 3.5.3 #> 425: tools 3.5.3 #> 426: translations 3.5.3 #> 427: utils 3.5.3