check_pkg: Check whether a package is available

View source: R/check_pkg.R

check_pkgR Documentation

Check whether a package is available

Description

Check whether a package is available

Usage

check_pkg(pkg, bioc = FALSE)

Arguments

pkg

The name of the package.

bioc

Whether it is a Bioconductor package.

Details

One of the suggestions to avoid heavy dependencies is to put parent packages that are not frequently used to 'Suggests' and to load them when the corresponding functions are used. Here the check_pkg function helps to check whether these parent packages are avaiable and if not, it prints messages to guide users to install the corresponding packages.

Examples

# There is no example
NULL


pkgndep documentation built on Nov. 16, 2022, 1:08 a.m.