R/assert-installed.R

Defines functions assert_installed

assert_installed <- function(pkg, cran = TRUE) {
  if (!requireNamespace(pkg))
    stop("package '", pkg, "' must be installed to run this function. ",
         if (cran) "Install it with install.packages('", pkg, "').")
}
pmcharrison/hrep documentation built on Feb. 18, 2024, 2:33 a.m.