package_installed: Check if a package is installed

View source: R/utils-package.R

package_installedR Documentation

Check if a package is installed

Description

Check if a package is installed

Usage

package_installed(pkgs, all = FALSE)

Arguments

pkgs

vector of package names

all

only returns TRUE if all packages are installed. Default is FALSE.

Value

logical, if packages are installed or not. If all=TRUE, return a logical value of whether all packages a re installed.

Examples


# Check if package base and dipsaus are installed
package_installed(c('base', 'dipsaus'))

# Check if all required packages are installed
package_installed(c('base', 'dipsaus'), all = TRUE)


dipsaus documentation built on June 27, 2024, 5:10 p.m.