R/conda.R

Defines functions using_conda

Documented in using_conda

#' @rdname conda
#' @title Determine whether Conda environment is being used
#'
#' @param env Optional environment name to compare against
#'
#' @return A logical value
#' @export
#'
#' @examples
#' # Check if Conda is being used (regardless of environment name)
#' using_conda()
#'
#' # Check if the 'dev' Conda environment is being used
#' using_conda(env = "dev")
using_conda <- function(env = NULL) {
  using_envvar("CONDA_DEFAULT_ENV", value = env)
}

Try the ami package in your browser

Any scripts or data that you put into this service are public.

ami documentation built on April 4, 2025, 2:39 a.m.