GitHub - r-lib/sessioninfo: Print Session Information (original) (raw)

sessioninfo

R Session Information

Lifecycle: stable R-CMD-check CRAN RStudio mirror downloads Codecov test coverage

Query and print information about the current R session. It is similar toutils::sessionInfo(), but includes more information about packages, and where they were installed from.

Differences from utils::sessionInfo()

Installation

Install the released version from CRAN

install.packages("sessioninfo")

Or the development version from GitHub:

install.packages("pak")

pak::pak("r-lib/sessioninfo")

Usage

Example output:

sessioninfo::session_info()

Screenshot of a terminal window demonstrating example output of the sessioninfo function.

Copying to the clipboard

You can use theclipr package to copy the session info to the clipboard:

clipr::write_clip(session_info())

(The current clipr version prints a warning, but you can ignore that.)

Writing to a file

You can use the to_file argument of session_info():

session_info(to_file = "session.log")

External software

sessioninfo::session_info(info = "external")

═ Session info ═══════════════════════════════════════════════════════════════
─ External software ──────────────────────────────────────────────────────────
 setting        value
 cairo          1.14.12
 cairoFT        2.10.0/2.13.1
 pango
 png            1.6.37
 jpeg           9.4
 tiff           LIBTIFF, Version 4.1.0
 tcl            8.6.6
 curl           7.54.0
 zlib           1.2.11
 bzlib          1.0.6, 6-Sept-2010
 xz             5.2.4
 PCRE           10.34 2019-11-21
 ICU            62.1
 TRE            TRE 0.8.0 R_fixes (BSD)
 iconv          GNU libiconv 1.11
 readline       5.2
 BLAS           /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libRblas.0.dylib
 lapack         /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libRlapack.dylib
 lapack_version 3.9.0

──────────────────────────────────────────────────────────────────────────────

Python configuration

sessioninfo::session_info(info = "python")

═ Session info ═══════════════════════════════════════════════════════════════
─ Python configuration ───────────────────────────────────────────────────────
 python:         /Users/gaborcsardi/Library/r-miniconda/envs/r-reticulate/bin/python
 libpython:      /Users/gaborcsardi/Library/r-miniconda/envs/r-reticulate/lib/libpython3.6m.dylib
 pythonhome:     /Users/gaborcsardi/Library/r-miniconda/envs/r-reticulate:/Users/gaborcsardi/Library/r-miniconda/envs/r-reticulate
 version:        3.6.13 | packaged by conda-forge | (default, Sep 23 2021, 07:55:15)  [GCC Clang 11.1.0]
 numpy:          /Users/gaborcsardi/Library/r-miniconda/envs/r-reticulate/lib/python3.6/site-packages/numpy
 numpy_version:  1.19.5

──────────────────────────────────────────────────────────────────────────────

Comparing session information

session_diff() can retrieve the session info from an URL or the clipboard and compare it to the current session information:

sessioninfo::session_diff(new = "https://github.com/r-lib/sessioninfo/issues/6")

--- local +++ https://github.com/r-lib/sessioninfo/issues/6 Session info ────────────────────────────────────────────────────────────────── setting value version R version 4.1.1 (2021-08-10) os macOS Mojave 10.14.6 system x86_64, darwin17.0 ui X11 language (EN) collate en_US.UTF-8 ctype en_US.UTF-8 tz Europe/Madrid pandoc 2.7.3 @ /usr/local/bin/pandoc

─ Packages ───────────────────────────────────────────────────────────────────── package * version date (UTC) lib source

Code of Conduct

Please note that the sessioninfo project is released with aContributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

License

GPL-2