check-scalar-isCondaEnabled | R Documentation |
Is conda enabled (active) in the current R session?
isCondaEnabled(ignoreBase = TRUE)
ignoreBase |
|
This checks CONDA_DEFAULT_ENV
and CONDA_SHLVL
system environment
variables internally.
TRUE
on success;
FALSE
on failure, with cause set.
Updated 2021-08-19.
vars <- c("CONDA_DEFAULT_ENV", "CONDA_SHLVL")
Sys.unsetenv(vars)
## TRUE ====
Sys.setenv(
"CONDA_DEFAULT_ENV" = "test",
"CONDA_SHLVL" = "2"
)
isCondaEnabled()
Sys.unsetenv(vars)
Sys.setenv(
"CONDA_DEFAULT_ENV" = "base",
"CONDA_SHLVL" = "1"
)
isCondaEnabled(ignoreBase = FALSE)
Sys.unsetenv(vars)
## FALSE ====
isCondaEnabled()
Sys.setenv(
"CONDA_DEFAULT_ENV" = "base",
"CONDA_SHLVL" = "1"
)
isCondaEnabled(ignoreBase = TRUE)
Sys.unsetenv(vars)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.