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

View source: R/utils.R

fail_on_missing_packageR Documentation

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

f <- function() fail_on_missing_package("foobar")
try(f())
g <- function() fail_on_missing_package("stats")
g()

daroczig/logger documentation built on Sept. 24, 2024, 4:13 a.m.