RQ {hutils} | R Documentation |
Shorthand for requireNamespace
Description
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.
Usage
RQ(pkg, yes = NULL, no = NULL)
Arguments
pkg |
Package to test whether the package is not yet installed. |
yes |
Response if |
no |
(optional) Response if |
Examples
## Not run:
RQ("dplyr", "dplyr needs installing")
## End(Not run)
[Package hutils version 1.8.1 Index]