View source: R/check_packages_installed.R
check_packages_installed | R Documentation |
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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.