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

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")
#> [1] TRUE
is_installed(c("base", "ggplot5"))
#> [1] FALSE