Skip to contents

Runs some R code with additional modules loaded, in addition to the currently loaded modules, without affecting your current modules.

Usage

with_extra_modules(new, code)

Arguments

new

A character vector of modules to load when executing code

code

Any R code to execute

Value

The result of evaluating code

Examples

system2("python3", "--version") |> with_extra_modules("python", code=_)
#>  Successfully loaded python
#>  Successfully unloaded python