R/utils.R

Defines functions checkInstalled

Documented in checkInstalled

#' Check Installed
#' 
#' Check that package is installed.
#' 
#' @param pkg Package name. 
#' 
#' @keywords internal
checkInstalled <- function(pkg){
  has_it <- base::requireNamespace(pkg, quietly = TRUE)

  if(!has_it)
    stop(sprintf("This function requires the package {%s}", pkg), call. = FALSE)
}

Try the log package in your browser

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

log documentation built on March 18, 2022, 6:02 p.m.