powered by
Check if R package can be loaded and fails loudly otherwise
fail_on_missing_package(pkg, min_version)
string
optional minimum version needed
if (FALSE) { f <- function() fail_on_missing_package('foobar') f() g <- function() fail_on_missing_package('stats') g() }
Run the code above in your browser using DataLab