R: Is a package installed in the library?

is_installed {rlang} | R Documentation

## Is a package installed in the library?

### Description

This checks that a package is installed with minimal side effects. If installed, the package will be loaded but not attached.

### Usage

    is_installed(pkg)

### Arguments

`pkg` | The name of a package.

### Value

`TRUE` if the package is installed, `FALSE` otherwise.

### Examples

    is_installed("utils")
    is_installed("ggplot5")

[Package rlang version 0.4.3 Index]