region.tree() now validates its arguments (taxon, location mode) before
checking that rgbif is installed, so argument errors (e.g. missing
location) are reported even when rgbif isn't available, instead of being
masked by the "requires the 'rgbif' package" message.region.tree() builds tree(s) for a clade within a geographic area,
pulling the species list from GBIF (via rgbif) and handing off to
taxa.tree(). Two modes:
radius_km around (lat, lon); the WKT
circle is built with geosphere and wound counter-clockwise as GBIF
requires.gadm (worldwide), or a Canadian
province/territory via province. All 13 Canadian provinces and
territories are supported by name or postal code (AB, BC, MB, NB, NL, NT,
NS, NU, ON, PE, QC, SK, YT).?region.tree.rgbif, geosphere.downto.tree()'s key argument now exports the NCBI Entrez key as the
ENTREZ_KEY environment variable for the duration of the call, so both
the get_uid and downstream requests use it (previously it reached only
get_uid). The prior ENTREZ_KEY value is restored on exit. Setting
ENTREZ_KEY yourself and leaving key = NULL works identically.Major backend change to make the package installable and CRAN-eligible again after its original dependencies were archived.
brranching / Phylomatic backend. brranching was archived
from CRAN (2023-02-24) and the Phylomatic web service it called
(phylodiversity.net) was shut down. Both functions now build trees as
induced subtrees of the Open Tree of Life synthetic tree via rotl.taxa.tree() groups taxa by phylum and returns one
tree per phylum, so no induced tree ever spans above phylum. Mammals,
angiosperms, arthropods, etc. come back as separate trees.taxa.tree() and downto.tree() now return (invisibly)
list(trees, unmatched), where trees is a list keyed by phylum and each
element is list(tree, dist). (Earlier 0.2.0 drafts returned a single
list(tree, dist, unmatched).)source = "fish" builds a dated chronogram from the
Fish Tree of Life (fishtree, in Suggests) for ray-finned fishes. Unlike
the topology-only Open Tree backend, its distance matrix is patristic
(time). Requires install.packages("fishtree").$unmatched instead of silently
failing inside try().downto.tree() resolves the taxon to a UID once (was queried repeatedly),
runs non-interactively (ask = FALSE), and supports db = "gbif" /
"itis" to avoid NCBI rate limits.dist is well defined (edge counts).brranching, phytools, xml2 are no longer used.