Learn R Programming

logger (version 0.2.2)

fail_on_missing_package: Check if R package can be loaded and fails loudly otherwise

Description

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

Run this code
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