Skip to contents

Captures all packages installed on .libPaths() and generates a manifesto-style TOML manifest. Package versions can either reflect their installed versions, or use a wildcard (*) to accept any.

Usage

manifest_from_installed(
  path,
  include_base = FALSE,
  min_version = c("installed", "*"),
  r_version = current_r_version()
)

Arguments

path

Optional path to write the manifest. If missing, a temporary .toml file is created.

include_base

Logical. Whether to include base packages. Defaults to FALSE.

min_version

Whether to require exact installed versions ('installed', default) or allow any version via a wildcard ('*').

r_version

Optional R version settings. Defaults to current_r_version().

Value

Path to the generated TOML file (invisibly).

Details

Base packages are excluded by default to minimize boilerplate.

Examples

path <- manifest_from_installed()