R/utils.R

require_ns <- function(pkg) {
  if (!requireNamespace(pkg, quietly = TRUE)) {
    stop(sprintf('Package "%s" needed for this function to work. Please install it.', pkg), call. = FALSE)
  }
}
tonyelhabr/temisc documentation built on May 26, 2019, 5:44 p.m.