R/utils.R

require_package <- function (pkg) {
  if (!requireNamespace(pkg, quietly = TRUE)) {
    stop(sprintf("The `%s` package must be installed to use this functionality. It can be installed with install.packages(\"%s\")",
                  pkg, pkg))
  }
}

Try the fromhere package in your browser

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

fromhere documentation built on April 3, 2025, 8:49 p.m.