session_info: Print session information

Description Usage Arguments Details Value 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
2
3
4
5
6
7
session_info(
  pkgs = c("loaded", "attached", "installed")[1],
  include_base = FALSE,
  info = c("auto", "all", "platform", "packages", "python", "external"),
  dependencies = NA,
  to_file = FALSE
)

Arguments

pkgs

Which packages to show. It may be:

  • NULL or "loaded": show all loaded packages,

  • "attached": show all attached packages,

  • "installed": show all installed packages,

  • a character vector of package names. Their (hard) dependencies are also shown by default, see the dependencies argument.

include_base

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

info

What information to show, it can be "auto" to choose automatically, "all" to show everything, or a character vector with elements from:

  • "platform": show platform information via platform_info(),

  • "packages": show package information via package_info(),

  • "python": show Python configuration via python_info(),

  • "external": show information about external software, via external_info().

dependencies

Whether to include the (recursive) dependencies as well. See the dependencies argument of utils::install.packages().

to_file

Whether to print the session information to a file. If TRUE the name of the file will be session-info.txt, but to_file may also be a string to specify the file name.

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).

Value

A session_info object.

If to_file is not FALSE then it is returned invisibly. (To print it to both a file and to the screen, use (session_info(to_file = TRUE)).)

Examples

1
2
session_info()
session_info("sessioninfo")

sessioninfo documentation built on Dec. 11, 2021, 9:07 a.m.