View source: R/obtainEnvironmentPath.R
obtainEnvironmentPath | R Documentation |
Obtain a path to a Conda environment, lazily installing it if necessary.
obtainEnvironmentPath(env)
env |
A BasiliskEnvironment object specifying the environment. Alternatively a string containing a path to an existing environment. |
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.
Aaron Lun
if (.Platform$OS.type != "windows") {
tmploc <- file.path(tempdir(), "my_package_A")
if (!file.exists(tmploc)) {
setupBasiliskEnv(tmploc, c('pandas=1.4.3'))
}
obtainEnvironmentPath(tmploc)
env <- BasiliskEnvironment("test_env", "basilisk",
packages=c("scikit-learn=1.1.1", "pandas=1.43.1"))
## Not run: obtainEnvironmentPath(env)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.