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:
Hadley Wickham
Winston Chang
Robert Flight
Kirill Müller
Jim Hester
Other contributors:
R Core team [contributor]
Posit Software, PBC [copyright holder, funder]
See Also
Useful links:
Report bugs at https://github.com/r-lib/sessioninfo/issues
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:
-
cairo
: The cairo version string. -
libpng
: The png version string. -
jpeg
: The jpeg version string. -
tiff
: The tiff library and version string used. -
tcl
: The tcl version string. -
curl
: The curl version string. -
zlib
: The zlib version string. -
bzlib
: The zlib version string. -
xz
: The zlib version string. -
PCRE
: The Perl Compatible Regular Expressions (PCRE) version string. -
ICU
: The International Components for Unicode (ICU) version string. -
TRE
: The TRE version string. -
iconv
: The iconv version string. -
readline
: The readline version string. -
BLAS
: The path with the implementation of BLAS in use. -
LAPACK
: The path with the implementation of LAPACK in use.
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:
|
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 |
Value
A data frame with columns:
-
package
: package name. -
ondiskversion
: package version (on the disk, which is sometimes not the same as the loaded version). -
loadedversion
: package version. This is the version of the loaded namespace ifpkgs
isNULL
, and it is the version of the package on disk otherwise. The two of them are almost always the same, though. -
path
: path to the package on disk. -
loadedpath
: the path the package was originally loaded from. -
attached
: logical, whether the package is attached to the search path. -
is_base
: logical, whether the package is a base package. -
date
: the date the package was installed or built, in UTC. -
source
: where the package was installed from. E.g.CRAN
,GitHub
,local
(from the local machine), etc. -
md5ok
: Whether MD5 hashes for package DLL files match, on Windows.NA
on other platforms. -
library
: factor, which package library the package was loaded from. For loaded packages, this is (the factor representation of)loadedpath
, for otherspath
.
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:
-
version
: the R version string. -
os
: the OS name in human readable format, seeos_name()
. -
system
: CPU, and machine readable OS name, separated by a comma. -
ui
: the user interface, e.g.Rgui
,RTerm
, etc. seeGUI
in base::.Platform. -
hostname
: the name of the machine known on the network, seenodename
inbase::Sys.info()
. For privacy, it is only included if thesessioninfo.include_hostname
option is set toTRUE
. -
language
: The current language setting. TheLANGUAGE
environment variable, if set, or(EN)
if unset. -
collate
: Collation rule, from the current locale. -
ctype
: Native character encoding, from the current locale. -
tz
: The current time zone. -
date
: The current date. -
rstudio
: RStudio format string, only added in RStudio. -
pandoc
: pandoc version and path -
quarto
: quarto version and path
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 |
packages |
How to compare the package info for
|
... |
Passed to any new |
Details
Various way to specify old
and new
:
A
session_info
object.-
"local"
runssession_info()
in the current session, and uses its output. -
"clipboard"
takes the session info from the system clipboard. If the clipboard contains a URL, it is followed to download the session info. The URL where you inspect the results for a GitHub Actions job. Typically has this form:
https://github.com/OWNER/REPO/actions/runs/RUN_ID/jobs/HTML_ID
Internally, this URL is parsed so we can look up the job id, get the log file, and extract session info.
Any other URL starting with
http://
orhttps://
.session_diff()
searches the HTML (or text) page for the session info header to find the session info.
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:
|
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
|
dependencies |
Whether to include the (recursive) dependencies
as well. See the |
to_file |
Whether to print the session information to a file.
If |
Details
Columns in the printed package list:
-
package
: package name -
*
: whether the package is attached to the search path -
version
: package version. If the version is marked with(!)
that means that the loaded and the on-disk version of the package are different. -
date
: when the package was built, if this information is available. This is theDate/Publication
or theBuilt
field fromDESCRIPTION
. (These are usually added automatically by R.) Sometimes this data is not available, then it isNA
. -
source
: where the package was built or installed from, if available. Examples:CRAN (R 3.3.2)
,Github (r-lib/pkgbuild@8aab60b)
,Bioconductor
,local
.
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")