| Title: | Convert session info to a Lockfile |
|---|---|
| Description: | Convert session info (base or tidyverse version) object or printed output into an 'renv' lockfile. |
| Authors: | Hugo Gruson [aut, cre] (ORCID: <https://orcid.org/0000-0002-4094-1476>) |
| Maintainer: | Hugo Gruson <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.0.1 |
| Built: | 2026-07-03 14:11:20 UTC |
| Source: | https://codeberg.org/Bisaloo/sessioninfo2renv |
Convert an object to an renv lockfile
as_lockfile(x, lockfile, ...)as_lockfile(x, lockfile, ...)
x |
An object to convert |
lockfile |
A file path to write the lockfile to. If |
... |
Additional arguments passed to methods |
session_info object to an renv lockfilesession_info objects are produced by the sessioninfo::session_info()
function.
## S3 method for class 'session_info' as_lockfile(x, lockfile = stdout(), ...)## S3 method for class 'session_info' as_lockfile(x, lockfile = stdout(), ...)
x |
An object to convert |
lockfile |
A file path to write the lockfile to. If |
... |
Additional arguments passed to methods |
session_info object from its printed representationGet a session_info object from its printed representation
unformat_session_info(file)unformat_session_info(file)
file |
A file path to a text file containing the output of |
file <- system.file("extdata", "session_info.txt", package = "sessioninfo2renv") si <- unformat_session_info(file) class(si) print(si)file <- system.file("extdata", "session_info.txt", package = "sessioninfo2renv") si <- unformat_session_info(file) class(si) print(si)