Check that packages are installed, without loading them
Calls find.package() to check if the all packages are installed.
check_packages_installed( pkgs, warn = TRUE, msg = "The following packages are required but not installed: %s" )
pkgs |
( |
warn |
( |
msg |
( |
(logical()) named with package names. TRUE if the respective package is installed, FALSE otherwise.
check_packages_installed(c("mlr3misc", "foobar"), warn = FALSE)
# catch warning
tryCatch(check_packages_installed(c("mlr3misc", "foobaaar")),
packageNotFoundWarning = function(w) as.character(w))Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.