Package 'sessioninfo2renv'

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

Help Index


Convert an object to an renv lockfile

Description

Convert an object to an renv lockfile

Usage

as_lockfile(x, lockfile, ...)

Arguments

x

An object to convert

lockfile

A file path to write the lockfile to. If stdout() (the default), the lockfile is printed to the console.

...

Additional arguments passed to methods


Convert a session_info object to an renv lockfile

Description

session_info objects are produced by the sessioninfo::session_info() function.

Usage

## S3 method for class 'session_info'
as_lockfile(x, lockfile = stdout(), ...)

Arguments

x

An object to convert

lockfile

A file path to write the lockfile to. If stdout() (the default), the lockfile is printed to the console.

...

Additional arguments passed to methods


Get a session_info object from its printed representation

Description

Get a session_info object from its printed representation

Usage

unformat_session_info(file)

Arguments

file

A file path to a text file containing the output of

Examples

file <- system.file("extdata", "session_info.txt", package = "sessioninfo2renv")
si <- unformat_session_info(file)
class(si)
print(si)