Require some packages.
Packages are loaded either via requireNamespace
or require
.
If some packages could not be loaded and stop
is TRUE
the following exception is thrown:
“For <why> please install the following packages: <missing packages>”.
If why
is NULL
the message is:
“Please install the following packages: <missing packages>”.
requirePackages(packs, min.versions = NULL, why = "", stop = TRUE, suppress.warnings = FALSE, default.method = "attach")
packs |
[ |
min.versions |
[ |
why |
[ |
stop |
[ |
suppress.warnings |
[ |
default.method |
[ |
[logical
]. Named logical vector describing which packages could be loaded (with required version).
Same length as packs
.
requirePackages(c("BBmisc", "base"), why = "BBmisc example")
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.