B Appendix B: Reporting on Git and Session Info in R

This code lists the versions of R and all the R packages I’m using, tells me which computer and operating system processed these files, and connects this output to its git commit.

## [1] "mac-gonzo05.local"
## [1] "commit bfd5aaee6f3d2f548120e5d8ba831fcca4cac859"
## [2] "Author: Richard D Gonzalez <gonzo@umich.edu>"   
## [3] "Date:   Sun Jun 21 19:40:30 2020 -0400"
## R version 3.6.2 (2019-12-12)
## Platform: x86_64-apple-darwin15.6.0 (64-bit)
## Running under: macOS High Sierra 10.13.6
## 
## Matrix products: default
## BLAS:   /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRblas.0.dylib
## LAPACK: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib
## 
## attached base packages:
## [1] grid      splines   stats     graphics  grDevices
## [6] utils     datasets  methods   base     
## 
## other attached packages:
##  [1] tsfeaturex_0.4.0     GauPro_0.2.2.9000   
##  [3] tibbletime_0.1.3     nnet_7.3-13         
##  [5] NeuralNetTools_1.5.2 tidybayes_2.0.3     
##  [7] bayesplot_1.7.1      brms_2.12.0         
##  [9] Rcpp_1.0.4.6         ggfortify_0.4.10    
## [11] hts_6.0.0            forecast_8.12       
## [13] investr_1.4.0        gdtools_0.2.2       
## [15] ggiraph_0.7.7        urbnmapr_0.0.0.9002 
## [17] fiftystater_1.0.1    RColorBrewer_1.1-2  
## [19] ggforce_0.3.1        pracma_2.2.9        
## [21] pander_0.6.3         nlrx_0.4.1          
## [23] gamm4_0.2-6          mgcv_1.8-31         
## [25] texreg_1.36.23       stargazer_5.2.2     
## [27] rnn_0.9.8            readxl_1.3.1        
## [29] Hmisc_4.4-0          Formula_1.2-3       
## [31] survival_3.1-11      lattice_0.20-41     
## [33] merTools_0.5.0       arm_1.10-1          
## [35] MASS_7.3-51.5        nlme_3.1-145        
## [37] lme4_1.1-23          Matrix_1.2-18       
## [39] sjlabelled_1.1.3     sjmisc_2.8.4        
## [41] sjPlot_2.8.3         ggrepel_0.8.2       
## [43] viridis_0.5.1        viridisLite_0.3.0   
## [45] ggthemes_4.2.0       maps_3.3.0          
## [47] scales_1.1.0         ggeffects_0.14.2    
## [49] gganimate_1.0.5      tidycensus_0.9.9.2  
## [51] magrittr_1.5         rvest_0.3.5         
## [53] xml2_1.3.0           forcats_0.5.0       
## [55] stringr_1.4.0        dplyr_0.8.5         
## [57] purrr_0.3.3          tidyr_1.0.2         
## [59] tibble_3.0.1         ggplot2_3.3.0       
## [61] tidyverse_1.3.0      readr_1.3.1         
## [63] bookdown_0.18        knitr_1.28          
## 
## loaded via a namespace (and not attached):
##   [1] estimability_1.3     rappdirs_0.3.1      
##   [3] SparseM_1.78         coda_0.19-3         
##   [5] acepack_1.4.1        dygraphs_1.1.1.6    
##   [7] multcomp_1.4-12      inline_0.3.15       
##   [9] data.table_1.12.8    rpart_4.1-15        
##  [11] generics_0.0.2       callr_3.4.3         
##  [13] TH.data_1.0-10       lubridate_1.7.8     
##  [15] httpuv_1.5.2         StanHeaders_2.21.0-1
##  [17] assertthat_0.2.1     gifski_0.8.6        
##  [19] xfun_0.12            hms_0.5.3           
##  [21] evaluate_0.14        promises_1.1.0      
##  [23] fansi_0.4.1          progress_1.2.2      
##  [25] dbplyr_1.4.2         igraph_1.2.5        
##  [27] DBI_1.1.0            quantmod_0.4.17     
##  [29] htmlwidgets_1.5.1    stats4_3.6.2        
##  [31] ellipsis_0.3.0       crosstalk_1.1.0.1   
##  [33] selectr_0.4-2        backports_1.1.6     
##  [35] insight_0.8.2        markdown_1.1        
##  [37] vctrs_0.2.4          TTR_0.23-6          
##  [39] entropy_1.2.1        abind_1.4-5         
##  [41] withr_2.2.0          tigris_0.9.4        
##  [43] checkmate_2.0.0      rgdal_1.4-8         
##  [45] emmeans_1.4.5        xts_0.12-0          
##  [47] prettyunits_1.1.1    mnormt_1.5-6        
##  [49] cluster_2.1.0        urca_1.3-0          
##  [51] crayon_1.3.4         pkgconfig_2.0.3     
##  [53] labeling_0.3         units_0.6-6         
##  [55] tweenr_1.0.1         blme_1.0-4          
##  [57] rlang_0.4.5          lifecycle_0.2.0     
##  [59] miniUI_0.1.1.1       colourpicker_1.0    
##  [61] sandwich_2.5-1       modelr_0.1.6        
##  [63] cellranger_1.1.0     polyclip_1.10-0     
##  [65] matrixStats_0.56.0   lmtest_0.9-37       
##  [67] loo_2.2.0            boot_1.3-24         
##  [69] zoo_1.8-7            reprex_0.3.0        
##  [71] base64enc_0.1-3      processx_3.4.2      
##  [73] ggridges_0.5.2       png_0.1-7           
##  [75] parameters_0.6.1     KernSmooth_2.23-16  
##  [77] lbfgs_1.2.1          classInt_0.4-3      
##  [79] maptools_0.9-9       jpeg_0.1-8.1        
##  [81] shinystan_2.5.0      plyr_1.8.6          
##  [83] threejs_0.3.3        compiler_3.6.2      
##  [85] rstantools_2.0.0     cli_2.0.2           
##  [87] ps_1.3.2             Brobdingnag_1.2-6   
##  [89] htmlTable_1.13.3     tidyselect_1.0.0    
##  [91] stringi_1.4.6        tseries_0.10-47     
##  [93] highr_0.8            yaml_2.2.1          
##  [95] svUnit_0.7-12        latticeExtra_0.6-29 
##  [97] bridgesampling_1.0-0 tools_3.6.2         
##  [99] parallel_3.6.2       matrixcalc_1.0-3    
## [101] rstudioapi_0.11      uuid_0.1-4          
## [103] foreach_1.5.0        foreign_0.8-76      
## [105] gridExtra_2.3        farver_2.0.3        
## [107] digest_0.6.25        shiny_1.4.0.2       
## [109] quadprog_1.5-8       broom_0.5.5         
## [111] performance_0.4.5    later_1.0.0         
## [113] httr_1.4.1           rsconnect_0.8.16    
## [115] psych_1.9.12.31      sf_0.9-3            
## [117] effectsize_0.3.0     sjstats_0.17.9      
## [119] colorspace_1.4-1     fs_1.4.1            
## [121] Langevin_1.2.1       statmod_1.4.34      
## [123] sp_1.4-1             shinythemes_1.1.2   
## [125] mapproj_1.2.7        systemfonts_0.2.1   
## [127] xtable_1.8-4         jsonlite_1.6.1      
## [129] nloptr_1.2.2.1       rstan_2.19.3        
## [131] timeDate_3043.102    R6_2.4.1            
## [133] pillar_1.4.3         htmltools_0.4.0     
## [135] mime_0.9             glue_1.4.0          
## [137] fastmap_1.0.1        minqa_1.2.4         
## [139] DT_0.13              class_7.3-16        
## [141] codetools_0.2-16     pkgbuild_1.0.7      
## [143] mvtnorm_1.1-0        utf8_1.1.4          
## [145] arrayhelpers_1.1-0   curl_4.3            
## [147] gtools_3.8.2         shinyjs_1.1         
## [149] sigmoid_0.3.0        rmarkdown_2.1       
## [151] munsell_0.5.0        e1071_1.7-3         
## [153] iterators_1.0.12     haven_2.2.0         
## [155] fracdiff_1.5-1       reshape2_1.4.4      
## [157] gtable_0.3.0         bayestestR_0.5.3

It is good to save this information to a separate file so that it can be added to the git repo and current versions of packages are listed.

There are more systematic approaches to creating self-contained environments with the package renv or solutions outside R such as docker containers.