Title: | 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. |
Authors: | 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] |
Maintainer: | Gábor Csárdi <[email protected]> |
License: | GPL-2 |
Version: | 1.2.2.9000 |
Built: | 2024-11-05 05:43:32 UTC |
Source: | https://github.com/r-lib/sessioninfo |
Information about related software
external_info()
external_info()
Note that calling this function will attempt to load the tcltk and grDevices packages.
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.
Similar functions and objects in the base packages:
utils::sessionInfo()
, base::extSoftVersion, tcltk::tclVersion()
base::La_library, base::La_version()
, base::libcurlVersion()
.
external_info()
external_info()
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.
os_name()
os_name()
It uses utils::sessionInfo()
, but simplifies its output a bit
on Windows, to make it more concise.
A character scalar.
Information about the currently loaded packages, or about a chosen set
package_info( pkgs = c("loaded", "attached", "installed")[1], include_base = FALSE, dependencies = NA )
package_info( pkgs = c("loaded", "attached", "installed")[1], include_base = FALSE, dependencies = NA )
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 |
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 if pkgs
is NULL
, 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 others path
.
See session_info()
for the description of the printed columns
by package_info
(as opposed to the returned columns).
package_info() package_info("sessioninfo")
package_info() package_info("sessioninfo")
Information about the current platform
platform_info()
platform_info()
A list with elements:
version
: the R version string.
os
: the OS name in human readable format, see os_name()
.
system
: CPU, and machine readable OS name, separated by a comma.
ui
: the user interface, e.g. Rgui
, RTerm
, etc. see GUI
in base::.Platform.
hostname
: the name of the machine know on the network, see
nodename
in base::Sys.info()
.
language
: The current language setting. The LANGUAGE
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
Similar functions and objects in the base packages:
base::R.version.string, utils::sessionInfo()
, base::version,
base::.Platform, base::Sys.getlocale()
, base::Sys.timezone()
.
platform_info()
platform_info()
Python configuration
python_info()
python_info()
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.
python_info() session_info(info = "all")
python_info() session_info(info = "all")
Compare session information from two sources
session_diff( old = "local", new = "clipboard", packages = c("diff", "merge"), ... )
session_diff( old = "local", new = "clipboard", packages = c("diff", "merge"), ... )
old , new
|
A |
packages |
How to compare the package info for
|
... |
Passed to any new |
Various way to specify old
and new
:
A session_info
object.
"local"
runs session_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://
or https://
. session_diff()
searches the HTML (or text) page for the session info header to find the
session info.
session_diff()
session_diff()
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).
session_info( pkgs = c("loaded", "attached", "installed")[1], include_base = FALSE, info = c("auto", "all", "platform", "packages", "python", "external"), dependencies = NA, to_file = FALSE )
session_info( pkgs = c("loaded", "attached", "installed")[1], include_base = FALSE, info = c("auto", "all", "platform", "packages", "python", "external"), dependencies = NA, to_file = FALSE )
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 |
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 the Date/Publication
or the Built
field from
DESCRIPTION
. (These are usually added automatically by R.)
Sometimes this data is not available, then it is NA
.
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).
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))
.)
session_info() session_info("sessioninfo")
session_info() session_info("sessioninfo")