functionMap (version 1.0.0)

with_package: Evaluate an expression with a package loaded

Description

The package will be installed into a temporary directory. Then all required dependencies will be loaded, and the package will be loaded as well.

Usage

with_package(path, expr)

Arguments

path
Path to the package directory and tarball to load.
expr
Expression to evaluate.

Value

Value of the evaluated expression.

Details

After the expression is evaluated, all dependencies and the package itself will be unloaded, and the temporary library directory will be deleted. The library path will be also restored.