check_pkg_installed {cards} | R Documentation |
Check Package Installation
Description
-
check_pkg_installed()
: checks whether a package is installed and returns an error if not available, or interactively asks user to install missing dependency. If a package search is provided, the function will check whether a minimum version of a package is required and installed. -
is_pkg_installed()
: checks whether a package is installed and returnsTRUE
orFALSE
depending on availability. If a package search is provided, the function will check whether a minimum version of a package is required and installed. -
get_pkg_dependencies()
returns a tibble with all dependencies of a specific package. -
get_min_version_required()
will return, if any, the minimum version ofpkg
required byreference_pkg
.
Usage
check_pkg_installed(pkg, reference_pkg = "cards", call = get_cli_abort_call())
is_pkg_installed(pkg, reference_pkg = "cards", call = get_cli_abort_call())
get_pkg_dependencies(
reference_pkg = "cards",
lib.loc = NULL,
call = get_cli_abort_call()
)
get_min_version_required(
pkg,
reference_pkg = "cards",
lib.loc = NULL,
call = get_cli_abort_call()
)
Arguments
pkg |
( |
reference_pkg |
( |
call |
( |
lib.loc |
( |
Value
is_pkg_installed()
and check_pkg_installed()
returns a logical or error,
get_min_version_required()
returns a data frame with the minimum version required,
get_pkg_dependencies()
returns a tibble.
Examples
check_pkg_installed("dplyr")
is_pkg_installed("dplyr")
get_pkg_dependencies()
get_min_version_required("dplyr")