Ending R sessions

At the end of each session, you can extract information about the session itself (e.g. which R version you used and which versions of packages). This can help others (or even your future self) to reproduce the analysis that you have done.

Extracting session information

You can extract the session information by running the sessionInfo function (without any arguments)

sessionInfo()
## R version 4.4.1 (2024-06-14 ucrt)
## Platform: x86_64-w64-mingw32/x64
## Running under: Windows 11 x64 (build 22631)
## 
## Matrix products: default
## 
## 
## locale:
## [1] LC_COLLATE=English_Australia.utf8  LC_CTYPE=English_Australia.utf8   
## [3] LC_MONETARY=English_Australia.utf8 LC_NUMERIC=C                      
## [5] LC_TIME=English_Australia.utf8    
## 
## time zone: Australia/Brisbane
## tzcode source: internal
## 
## attached base packages:
## [1] stats     graphics  grDevices utils     datasets  methods   base     
## 
## other attached packages:
##  [1] flextable_0.9.7  here_1.0.1       tokenizers_0.3.0 quanteda_4.1.0  
##  [5] tidytext_0.4.2   lubridate_1.9.3  forcats_1.0.0    stringr_1.5.1   
##  [9] dplyr_1.1.4      purrr_1.0.2      readr_2.1.5      tidyr_1.3.1     
## [13] tibble_3.2.1     ggplot2_3.5.1    tidyverse_2.0.0 
## 
## loaded via a namespace (and not attached):
##  [1] fastmatch_1.1-4         gtable_0.3.5            xfun_0.48              
##  [4] bslib_0.8.0             lattice_0.22-6          tzdb_0.4.0             
##  [7] vctrs_0.6.5             tools_4.4.1             generics_0.1.3         
## [10] klippy_0.0.0.9500       fansi_1.0.6             highr_0.11             
## [13] janeaustenr_1.0.0       pkgconfig_2.0.3         Matrix_1.7-1           
## [16] data.table_1.16.2       assertthat_0.2.1        uuid_1.2-1             
## [19] lifecycle_1.0.4         farver_2.1.2            compiler_4.4.1         
## [22] textshaping_0.4.0       munsell_0.5.1           fontquiver_0.2.1       
## [25] fontLiberation_0.1.0    SnowballC_0.7.1         htmltools_0.5.8.1      
## [28] sass_0.4.9              yaml_2.3.10             pillar_1.9.0           
## [31] jquerylib_0.1.4         openssl_2.2.2           cachem_1.1.0           
## [34] fontBitstreamVera_0.1.1 stopwords_2.3           zip_2.3.1              
## [37] tidyselect_1.2.1        digest_0.6.37           stringi_1.8.4          
## [40] bookdown_0.41           labeling_0.4.3          rprojroot_2.0.4        
## [43] fastmap_1.2.0           grid_4.4.1              colorspace_2.1-1       
## [46] cli_3.6.3               magrittr_2.0.3          utf8_1.2.4             
## [49] withr_3.0.1             gdtools_0.4.0           scales_1.3.0           
## [52] timechange_0.3.0        rmarkdown_2.28          officer_0.6.7          
## [55] askpass_1.2.1           ragg_1.3.3              hms_1.1.3              
## [58] evaluate_1.0.1          knitr_1.48              rlang_1.1.4            
## [61] Rcpp_1.0.13             glue_1.8.0              xml2_1.3.6             
## [64] rstudioapi_0.17.1       jsonlite_1.8.9          R6_2.5.1               
## [67] systemfonts_1.1.0

LADAL home


References