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