Skip to contents

Check if R package can be loaded and fails loudly otherwise

Usage

fail_on_missing_package(pkg, min_version)

Arguments

pkg

string

min_version

optional minimum version needed

Examples

if (FALSE) { # \dontrun{
f <- function() fail_on_missing_package("foobar")
f()
g <- function() fail_on_missing_package("stats")
g()
} # }