check_packages_installed {mlr3misc} | R Documentation |
Check that packages are installed, without loading them
Description
Calls find.package()
to check if the all packages are installed.
Usage
check_packages_installed(
pkgs,
warn = TRUE,
msg = "The following packages are required but not installed: %s"
)
Arguments
pkgs |
( |
warn |
( |
msg |
( |
Value
(logical()
) named with package names. TRUE
if the respective package is installed, FALSE
otherwise.
Examples
check_packages_installed(c("mlr3misc", "foobar"), warn = FALSE)
# catch warning
tryCatch(check_packages_installed(c("mlr3misc", "foobaaar")),
packageNotFoundWarning = function(w) as.character(w))
[Package mlr3misc version 0.15.1 Index]