RQ | R Documentation |
requireNamespace
Present since hutils v1.2.0
. Alias for if (!requireNamespace(pkg, quietly = TRUE))
yes else
no.
Typical use-case would be RQ(pkg, install.packages("pkg"))].
Default values for yes
and no
from hutils v1.5.0
.
This function is not recommended for use in scripts as it is a bit cryptic; its use-case is for bash scripts and the like where calls like this would otherwise be frequent and cloud the message.
RQ(pkg, yes = NULL, no = NULL)
pkg |
Package to test whether the package is not yet installed. |
yes |
Response if |
no |
(optional) Response if |
## Not run: RQ("dplyr", "dplyr needs installing") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.