R/jamba-utils.R
check_pkg_installed.Rd
Lightweight method to check if an R package is installed
check_pkg_installed(x, ...)
character
string of package or packages to test.
additional arguments are ignored.
logical
indicating whether each value in x
represents an installed R package.
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.
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()
check_pkg_installed("methods")
#> methods
#> TRUE
check_pkg_installed(c("jamba",
"multienrichjam",
"venndir",
"methods",
"blah"))
#> jamba multienrichjam venndir methods blah
#> TRUE TRUE TRUE TRUE FALSE