obtainEnvironmentPath: Obtain the environment path

View source: R/obtainEnvironmentPath.R

obtainEnvironmentPathR Documentation

Obtain the environment path

Description

Obtain a path to a Conda environment, lazily installing it if necessary.

Usage

obtainEnvironmentPath(env)

Arguments

env

A BasiliskEnvironment object specifying the environment. Alternatively a string containing a path to an existing environment.

Value

String containing the path to an instantiated Conda environment.

For a BasiliskEnvironment env, the function will also lazily create the environment if useSystemDir() returns FALSE and the environment does not already exist.

Author(s)

Aaron Lun

Examples



tmploc <- file.path(tempdir(), "my_package_A")
if (!file.exists(tmploc)) {
    setupBasiliskEnv(tmploc, c(pandas_spec()))
}
obtainEnvironmentPath(tmploc)

env <- BasiliskEnvironment("test_env", "basilisk", 
    packages=c(scikit_learn_spec(), pandas_spec()))
## Not run: obtainEnvironmentPath(env)

LTLA/jormungandR documentation built on Feb. 6, 2024, 2:29 p.m.