needs: Check the Availability of a Package

View source: R/assert.R

needsR Documentation

Check the Availability of a Package

Description

Check the Availability of a Package

Usage

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

needs() 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.

Value

Invisibly returns NULL.

Author(s)

N. Frerebeau

See Also

Other validation methods: check-attribute, check-data, check-matrix, check-numeric-comparison, check-numeric-trend, check-numeric, check-type, validate()


arkhe documentation built on Nov. 17, 2023, 5:09 p.m.