R/aaa.r

Defines functions try_require

try_require <- function(package, fun) {
  if (requireNamespace(package, quietly = TRUE)) {
    library(package, character.only = TRUE)
    return(invisible())
  }

  stop("Package `", package, "` required for `", fun , "`.\n", # nocov start
    "Please install and try again.", call. = FALSE) # nocov end
}

Try the hrbrthemes package in your browser

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

hrbrthemes documentation built on May 29, 2024, 4:05 a.m.