checkInstalled: Check packages are installed otherwise suggest

View source: R/checkInstalled.R

checkInstalledR Documentation

Check packages are installed otherwise suggest

Description

checkInstalled allows to check if a package is installed. If the package is not available, a convenient copy-and-paste message is provided for package installation with BiocManager. The function is typically used within functions that check for package availability from the Suggests field.

Usage

checkInstalled(pkgs)

Arguments

pkgs

character() package names required for a function

Value

TRUE if all packages are installed, otherwise stops with a message and suggests installation of missing packages

Author(s)

M. Morgan, M. Ramos

Examples

if (interactive()) {
    checkInstalled(
        c("BiocParallel", "SummarizedExperiment")
    )
}

Bioconductor/BiocDeveloper documentation built on Oct. 31, 2024, 5:50 a.m.