assert_package | R Documentation |
The function .assert_package()
checks whether a package is installed and
returns an error or FALSE
if not available. If a package search is provided,
the function will check whether a minimum version of a package is required.
The function .get_package_dependencies()
returns a tibble with all
dependencies of a specific package. Finally, .get_min_version_required()
will return, if any, the minimum version of pkg
required by pkg_search
,
NULL
if no minimum version required.
.assert_package(pkg, fn = NULL, pkg_search = "broom.helpers", boolean = FALSE)
.get_package_dependencies(pkg_search = "broom.helpers")
.get_all_packages_dependencies(
pkg_search = NULL,
remove_duplicates = FALSE,
lib.loc = NULL
)
.get_min_version_required(pkg, pkg_search = "broom.helpers")
pkg |
( |
fn |
( |
pkg_search |
( |
boolean |
( |
remove_duplicates |
( |
lib.loc |
( |
get_all_packages_dependencies()
could be used to get the list of
dependencies of all installed packages.
logical or error for .assert_package()
, NULL
or character with
the minimum version required for .get_min_version_required()
, a tibble for
.get_package_dependencies()
.
.assert_package("broom", boolean = TRUE)
.get_package_dependencies()
.get_min_version_required("brms")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.