Skip to contents

Is the package installed?

Usage

isInstalled(x, lib = NULL)

allAreInstalled(x, lib = NULL)

Arguments

x

Object.

lib

character(1) or NULL. R library location. If left NULL, includes all known library paths defined in .libPaths.

Value

TRUE on success; FALSE on failure, with cause set.

Functions

  • isInstalled(): Vectorized.

  • allAreInstalled(): Scalar.

Note

Updated 2023-09-29.

Examples

## TRUE ====
isInstalled(c("base", "utils"))
#> [1] TRUE TRUE

## FALSE ====
isInstalled(c("AAA", "BBB"))
#> [1] FALSE FALSE