Learn R Programming

valueprhr (version 0.1.0)

check_package: Check if Required Package is Available

Description

Checks for package availability and provides informative error message.

Usage

check_package(pkg, reason = "this functionality")

Value

TRUE invisibly if package is available, otherwise stops with error.

Arguments

pkg

Character string with package name.

reason

Character string explaining why the package is needed.

Examples

Run this code
check_package("stats", "basic statistics")

Run the code above in your browser using DataLab