Title: R Session Information
Version: 1.2.3
Maintainer: Gábor Csárdi <csardi.gabor@gmail.com>
Description: Query and print information about the current R session. It is similar to 'utils::sessionInfo()', but includes more information about packages, and where they were installed from.
License: GPL-2
URL: https://github.com/r-lib/sessioninfo#readme, https://sessioninfo.r-lib.org
BugReports: https://github.com/r-lib/sessioninfo/issues
Depends: R (≥ 3.4)
Imports: cli (≥ 3.1.0), tools, utils
Suggests: callr, covr, gh, reticulate, rmarkdown, testthat (≥ 3.2.0), withr
Config/Needs/website: pkgdown, tidyverse/tidytemplate
Config/testthat/edition: 3
Config/testthat/parallel: true
Encoding: UTF-8
RoxygenNote: 7.3.2
NeedsCompilation: no
Packaged: 2025-02-05 12:57:47 UTC; gaborcsardi
Author: Gábor Csárdi [cre], Hadley Wickham [aut], Winston Chang [aut], Robert Flight [aut], Kirill Müller [aut], Jim Hester [aut], R Core team [ctb], Posit Software, PBC [cph, fnd]
Repository: CRAN
Date/Publication: 2025-02-05 13:40:02 UTC

sessioninfo: R Session Information

Description

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

Author(s)

Maintainer: Gábor Csárdi csardi.gabor@gmail.com

Authors:

Other contributors:

See Also

Useful links:


Information about related software

Description

Information about related software

Usage

external_info()

Details

Note that calling this function will attempt to load the tcltk and grDevices packages.

Value

A list with elements:

See Also

Similar functions and objects in the base packages: utils::sessionInfo(), base::extSoftVersion, tcltk::tclVersion() base::La_library, base::La_version(), base::libcurlVersion().

Examples


external_info()


Human readable name of the current operating system

Description

For example Windows 8.1 instead of Windows version 6.3.9600. On macOS it includes the code names, on Linux it includes the distribution names and codenames if appropriate.

Usage

os_name()

Details

It uses utils::sessionInfo(), but simplifies its output a bit on Windows, to make it more concise.

Value

A character scalar.


Information about the currently loaded packages, or about a chosen set

Description

Information about the currently loaded packages, or about a chosen set

Usage

package_info(
  pkgs = c("loaded", "attached", "installed")[1],
  include_base = FALSE,
  dependencies = NA
)

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.

dependencies

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

Value

A data frame with columns:

See session_info() for the description of the printed columns by package_info (as opposed to the returned columns).

Examples


package_info()
package_info("sessioninfo")


Information about the current platform

Description

Information about the current platform

Usage

platform_info()

Value

A list with elements:

See Also

Similar functions and objects in the base packages: base::R.version.string, utils::sessionInfo(), base::version, base::.Platform, base::Sys.getlocale(), base::Sys.timezone().

Examples


platform_info()


Python configuration

Description

Python configuration

Usage

python_info()

Value

Returns a reticulate::py_config object, which also has the python_info class. It is a named list of values.

If reticulate is not installed or Python is not configured, then it return a python_info object that is a character vector, and it does not have a py_config class.

Examples


python_info()
session_info(info = "all")


Compare session information from two sources

Description

Compare session information from two sources

Usage

session_diff(
  old = "local",
  new = "clipboard",
  packages = c("diff", "merge"),
  ...
)

Arguments

old, new

A session_info object (the return value of session_info()), or a pointer to session_info() output. See details below.

packages

How to compare the package info for old and new:

  • "diff": line diffs, in the style of diff -u

  • "merge": merge the information into one data frame, with one row per package. Only package version and source are compared.

...

Passed to any new session_info() calls.

Details

Various way to specify old and new:

Examples


session_diff()


Print session information

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

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:

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


session_info()
session_info("sessioninfo")