Assembles a prose text containing the reason why a certain R package is required by the fn
of another pkg
. Intended to be used as argument reason
of
rlang::check_installed()
.
Usage
reason_pkg_required(
fn = rlang::call_name(rlang::caller_call()),
pkg = utils::packageName(parent.frame())
)
Examples
if (FALSE) { # \dontrun{
rlang::check_installed(pkg = "foo",
reason = pal::reason_pkg_required(pkg = "bar",
fn = "serve"))
} # }