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.
Examples
## TRUE ====
isInstalled(c("base", "utils"))
#> [1] TRUE TRUE
## FALSE ====
isInstalled(c("AAA", "BBB"))
#> [1] FALSE FALSE