Check if R package can be loaded and fails loudly otherwise
Source:R/utils.R
fail_on_missing_package.Rd
Check if R package can be loaded and fails loudly otherwise
Examples
f <- function() fail_on_missing_package("foobar")
try(f())
#> Error : Please install the 'foobar' package to use pkgdown::build_site_github_pages
g <- function() fail_on_missing_package("stats")
g()