R: Are packages installed in any of the libraries?

is_installed {rlang} | R Documentation

## Are packages installed in any of the libraries?

### Description

This checks that packages are installed with minimal side effects. If installed, the packages will be loaded but not attached.

### Usage

    is_installed(pkg)

### Arguments

`pkg` | The package names.

### Value

`TRUE` if all package names provided in `pkg` are installed, `FALSE` otherwise.

### Examples

    is_installed("utils")
    is_installed(c("base", "ggplot5"))

[Package rlang version 0.4.7 Index]