occCite (version 0.4.5)

studyTaxonList: Study Taxon List

Description

Takes input phylogenies or vectors of taxon names, checks against taxonomic database, returns vector of cleaned taxonomic names (using taxonRectification) for use in spocc queries, as well as warnings if there are invalid names.

Usage

studyTaxonList(x = NULL, datasources = c("NCBI"))

Arguments

x

A phylogeny of class 'phylo' or a vector of class 'character' containing the names of taxa of interest

datasources

A vector of taxonomic data sources implemented in gnr_resolve. You can see the list using taxize::gnr_datasources().

Value

An object of class occCiteData containing the type of inquiry the user has made --a phylogeny or a vector of names-- and a data frame containing input taxa names, the closest match according to gnr_resolve, and a list of taxonomic data sources that contain the matching name.

Examples

Run this code
# NOT RUN {
## Inputting a vector of taxon names
studyTaxonList(x = c("Buteo buteo",
                     "Buteo buteo hartedi",
                     "Buteo japonicus"),
                     datasources = c('NCBI'))

## Inputting a phylogeny
phylogeny <- ape::read.nexus(system.file("extdata/Fish_12Tax_time_calibrated.tre",
     package = "occCite"))
phylogeny <- ape::extract.clade(phylogeny, 18)
studyTaxonList(x = phylogeny, datasources = c('NCBI'))

# }

Run the code above in your browser using DataLab