session_info: Print session information

Description Usage Arguments Details Examples

View source: R/session-info.R

Description

This is utils::sessionInfo() re-written from scratch to both exclude data that's rarely useful (e.g., the full collate string or base packages loaded) and include stuff you'd like to know (e.g., where a package was installed from).

Usage

1
session_info(pkgs = NULL, include_base = FALSE)

Arguments

pkgs

Either a vector of package names or NULL. If NULL, displays all loaded packages. If a character vector, also, includes all dependencies of the package.

include_base

Include base packages in summary? By default this is false since base packages should always match the R version.

Details

Columns in the printed package list:

See package_info() for the list of columns in the data frame that is returned (as opposed to printed).

Examples

1
2
session_info()
session_info("sessioninfo")

Example output

sh: 1: cannot create /dev/null: Permission denied
sh: 1: cannot create /dev/null: Permission denied
Error in file(con, "r") : cannot open the connection
In addition: Warning message:
In file(con, "r") : cannot open file '/etc/timezone': Permission denied
Warning: Your system is mis-configured: '/etc/localtime' is not a symlink
sh: 1: cannot create /dev/null: Permission denied
- Session info ---------------------------------------------------------------
 setting  value                       
 version  R version 3.4.4 (2018-03-15)
 os       <NA>                        
 system   x86_64, linux-gnu           
 ui       X11                         
 language (EN)                        
 collate  C                           
 ctype    C                           
 tz       <NA>                        
 date     2020-05-22                  

- Packages -------------------------------------------------------------------
 package     * version date       lib source        
 assertthat    0.2.1   2019-03-21 [1] CRAN (R 3.4.4)
 cli           1.1.0   2019-03-19 [1] CRAN (R 3.4.4)
 crayon        1.3.4   2017-09-16 [1] CRAN (R 3.4.1)
 sessioninfo * 1.1.1   2018-11-05 [1] CRAN (R 3.4.4)
 withr         2.1.2   2018-03-15 [1] CRAN (R 3.4.4)

[1] /usr/local/lib/R/site-library
[2] /usr/lib/R/site-library
[3] /usr/lib/R/library
sh: 1: cannot create /dev/null: Permission denied
sh: 1: cannot create /dev/null: Permission denied
Error in file(con, "r") : cannot open the connection
In addition: Warning message:
In file(con, "r") : cannot open file '/etc/timezone': Permission denied
Warning: Your system is mis-configured: '/etc/localtime' is not a symlink
sh: 1: cannot create /dev/null: Permission denied
- Session info ---------------------------------------------------------------
 setting  value                       
 version  R version 3.4.4 (2018-03-15)
 os       <NA>                        
 system   x86_64, linux-gnu           
 ui       X11                         
 language (EN)                        
 collate  C                           
 ctype    C                           
 tz       <NA>                        
 date     2020-05-22                  

- Packages -------------------------------------------------------------------
 package     * version date       lib source        
 assertthat    0.2.1   2019-03-21 [1] CRAN (R 3.4.4)
 cli           1.1.0   2019-03-19 [1] CRAN (R 3.4.4)
 crayon        1.3.4   2017-09-16 [1] CRAN (R 3.4.1)
 sessioninfo * 1.1.1   2018-11-05 [1] CRAN (R 3.4.4)
 withr         2.1.2   2018-03-15 [1] CRAN (R 3.4.4)

[1] /usr/local/lib/R/site-library
[2] /usr/lib/R/site-library
[3] /usr/lib/R/library

sessioninfo documentation built on May 2, 2019, 11:07 a.m.