powered by
Check if R package can be loaded and fails loudly otherwise
fail_on_missing_package(pkg, min_version, call = NULL)
string
optional minimum version needed
Call to include in error message.
f <- function() fail_on_missing_package("foobar") try(f()) g <- function() fail_on_missing_package("stats") g()
Run the code above in your browser using DataLab