treeGet: Load a bird tree into the R environment

View source: R/extractTree.R

treeGetR Documentation

Load a bird tree into the R environment

Description

treeGet either reads a tree file and loads it as a phylo object, or loads the default tree data object.

Usage

treeGet(version, taxonomy_year, data_path = FALSE)

Arguments

version

The desired version of the tree. Default to the most recent version of the tree. Other versions available are '1.2','1.3','1.4', and can be passed as a character string or as numeric.

taxonomy_year

The eBird taxonomy year the tree should be output in. Current options include 2021, 2022, and 2023. Both numeric and character inputs are acceptable here. Any value aside from these years will result in an error. Default is set 2023.

data_path

Default to FALSE, it will look for a path containing the bird tree. If the tree has not been downloaded yet using get_avesdata_repo(), it will load the default tree using utils::data() and version and taxonomy_year will be ignored?? If the tree has been downloaded using get_avesdata_repo(), it will read the tree file corresponding to the version and taxonomy_year provided and load it as a phylo object.

Details

This will return a data object that has the requested tree.

Value

A phylo object with the requested version and taxonomy.


clootl documentation built on April 11, 2025, 5:38 p.m.