Report the install status of every pr_get_tree() backend
Source: R/pr_get_tree_status.R
pr_get_tree_status.RdWalks every backend supported by pr_get_tree() and reports
whether the underlying package is installed (and at what version),
whether it requires network, and what to do if it's missing. Useful
for first-time users figuring out which backends are available, and
for CI sanity checks.
Value
A data.frame with one row per backend and columns:
sourceBackend name, as passed to
pr_get_tree().installedLogical — is the package available?
versionCharacter — installed version, or
NA.needs_networkLogical — does the backend hit a remote server at runtime?
reachableLogical or
NA— result of the network check (only populated whencheck_network = TRUE).install_hintCharacter — the install command to run when
installed = FALSE.source_repoCharacter — "CRAN" or a GitHub repo for non-CRAN backends.
See also
pr_get_tree() / pr_date_tree() for the consumers.
Examples
# Local-only probe (fast, no network)
pr_get_tree_status()
#> source installed version needs_network reachable
#> 1 rotl TRUE 3.1.1 TRUE NA
#> 2 rtrees TRUE 1.0.4 FALSE NA
#> 3 clootl TRUE 0.1.4 FALSE NA
#> 4 fishtree TRUE 0.3.4 TRUE NA
#> 5 datelife FALSE <NA> FALSE NA
#> install_hint source_repo
#> 1 install.packages("rotl") CRAN
#> 2 pak::pak("daijiang/rtrees") github::daijiang/rtrees
#> 3 pak::pak("eliotmiller/clootl") github::eliotmiller/clootl
#> 4 install.packages("fishtree") CRAN
#> 5 pak::pak("phylotastic/datelife") github::phylotastic/datelife
if (FALSE) { # \dontrun{
# Also test reachability of remote backends
pr_get_tree_status(check_network = TRUE)
} # }