assert_package: Check the Availability of a Package

View source: R/assert.R

assert_packageR Documentation

Check the Availability of a Package

Description

Check the Availability of a Package

Usage

assert_package(x, ask = TRUE)

needs(x, ask = TRUE)

Arguments

x

A character vector naming the packages to check.

ask

A logical scalar: should the user be asked to select packages before they are downloaded and installed?

Details

assert_package() is designed for use inside other functions in your own package to check for the availability of a suggested package.

If the required packages are not available and R is running interactively, the user will be asked to install the packages.

needs() is an alias for assert_package().

Value

Invisibly returns NULL.

Author(s)

N. Frerebeau

See Also

Other validation methods: assert_constant(), assert_data, assert_length(), assert_lower(), assert_names(), assert_numeric, assert_square(), assert_type(), validate()


tesselle/arkhe documentation built on Feb. 22, 2024, 8:18 p.m.