env_exists {condathis} | R Documentation |
Check If Environment Already exists
Description
This function checks whether a specified Conda environment already exists
in the available environments. It returns TRUE
if the environment exists
and FALSE
otherwise.
Usage
env_exists(env_name)
Arguments
env_name |
Character. Name of the Conda environment where the packages are going to be installed. Defaults to 'condathis-env'. |
Value
Boolean. TRUE
if the environment exists and FALSE
otherwise.
Examples
## Not run:
condathis::with_sandbox_dir({
# Create the environment
condathis::create_env(
packages = "fastqc",
env_name = "fastqc-env"
)
# Check if the environment exists
condathis::env_exists("fastqc-env")
#> [1] TRUE
# Check for a non-existent environment
condathis::env_exists("non-existent-env")
#> [1] FALSE
})
## End(Not run)
[Package condathis version 0.1.0 Index]