Learn R Programming

BBmisc (version 1.5)

requirePackages: Require some packages.

Description

If some packages could not be loaded and stop is TRUE the following exception is thrown: For please install the following packages: . If why is NULL the message is: Please install the following packages: .

Usage

requirePackages(packs, why = NULL, stop = TRUE, suppress.warnings = FALSE,
  ...)

Arguments

packs
[character] Names of packages.
why
[character(1)] Short string explaining why packages are required. Default is NULL.
stop
[logical(1)] Should an exception be thrown for missing packages? Default is TRUE.
suppress.warnings
[logical(1)] Should warnings be suppressed in the calls to require? Default is FALSE.
...
[any] Passed on to require.

Value

  • [logical]. Named logical vector describing which packages could be loaded. Same length as packs.

Examples

Run this code
requirePackages(c("BBmisc", "base"), why="BBmisc example")

Run the code above in your browser using DataLab