Wrapper around rlang::is_installed().
Arguments
- x
Name of the package.
- .var.name
[
character(1)]
The custom name forxas passed to anyassert*function. Defaults to a heuristic name lookup.- add
[
AssertCollection]
Collection to store assertion messages. SeeAssertCollection.- info
[
character(1)]
Seeexpect_that- label
[
character(1)]
Seeexpect_that- ...
[any]
List of calls to check functions.
Functions
check_pkg_installed(): returnsTRUEor the error message as a string.assert_pkg_installed(): returnsxinvisibly or errors out.test_pkg_installed(): returnsTRUEorFALSEexpect_pkg_installed(): returns antestthat::expectation()skip_if_pkg_not_installed2(): skips test if package is not installed. Same astestthat::skip_if_not_installed(), except usingrlang::is_installed()under the hood.
See also
Other dependencies helper:
is_installed2(),
pkg_installed_but_not_via_loadall