check_pkg_installed: Lightweight method to check if an R package is installed

check_pkg_installedR Documentation

Lightweight method to check if an R package is installed

Description

Lightweight method to check if an R package is installed

Usage

check_pkg_installed(x, ...)

Arguments

x

character string of package or packages to test.

...

additional arguments are ignored.

Details

There are many methods to test for an installed package, this function represents possibly the most gentle and rapid approach. It simply calls system.file(package=""), which checks in the context of the active R session and uses the relevant .libPaths().

This approach does not use require() because that actually loads the package, which can take time and resources.

This approach also does not use installed.packages() which can also take substantial time if many packages are installed on a system.

Value

logical indicating whether each value in x represents an installed R package.

See Also

Other jam practical functions: breakDensity(), checkLightMode(), colNum2excelName(), color_dither(), diff_functions(), exp2signed(), fileInfo(), fixYellow(), getAxisLabel(), handleArgsText(), heads(), isFALSEV(), isTRUEV(), jamba, jargs(), kable_coloring(), lldf(), log2signed(), make_html_styles(), make_styles(), match_unique(), mergeAllXY(), middle(), minorLogTicks(), newestFile(), printDebug(), renameColumn(), rmInfinite(), rmNAs(), rmNA(), rmNULL(), sclass(), sdim(), setPrompt()

Examples

check_pkg_installed("methods")

check_pkg_installed(c("jamba",
   "multienrichjam",
   "venndir",
   "methods",
   "blah"))


jmw86069/jamba documentation built on Oct. 9, 2024, 10:52 a.m.