This checks that a package is installed with minimal side effects. If installed, the package will be loaded but not attached.
is_installed(pkg)
| pkg | The name of a package. |
|---|
TRUE if the package is installed, FALSE otherwise.
is_installed("utils")#> [1] TRUEis_installed("ggplot5")#> [1] FALSE