taxonomyGet: Load a bird taxonomy into the R environment

View source: R/extractTree.R

taxonomyGetR Documentation

Load a bird taxonomy into the R environment

Description

taxonomyGet either reads a taxonomy file and loads it as a ⁠data frame⁠, or loads the default taxonomy data object.

Usage

taxonomyGet(taxonomy_year, data_path = FALSE)

Arguments

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 taxonomy. If the taxonomy has not been downloaded yet using get_avesdata_repo(), it will load the default taxonomy using utils::data() as long as taxonomy_year as empty or matches the default version. If the taxonomy has been downloaded using get_avesdata_repo(), it will read the taxonomy file corresponding to the year given in taxonomy_year and load it as a ⁠data frame⁠ object.

Details

This will return a data object that has the taxonomy of the requested year.

Value

A data.frame with 17 columns of taxonomic information: order, species code, taxon concept, common name, scientific name, family, OpenTree Taxonomy data, etc.


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