R/utils_dependencies.R

Defines functions acep_require_namespace

#' Check optional package availability
#'
#' Internal helper for optional integrations.
#'
#' @noRd
acep_require_namespace <- function(pkg, feature) {
  if (!requireNamespace(pkg, quietly = TRUE)) {
    stop(
      sprintf(
        "La funcionalidad '%s' requiere instalar el paquete opcional '%s'. Instala el paquete con: install.packages(\"%s\")",
        feature,
        pkg,
        pkg
      ),
      call. = FALSE
    )
  }

  invisible(NULL)
}

Try the ACEP package in your browser

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

ACEP documentation built on May 14, 2026, 5:08 p.m.