pd_taxa: Gather taxonomic hierarchies

Description Usage Arguments Value taxonomic data Examples

View source: R/pd_taxa.R

Description

Gather taxonomic hierarchies

Usage

1
pd_taxa(x, db = "ncbi", drop_no_data = TRUE, ...)

Arguments

x

an object of class 'phylodiv'

db

(character) the database to use to get taxonomic information. only option is "ncbi" for now

drop_no_data

(logical) drop tips w/o taxonomic hierarchy data. default: 'TRUE'

...

ignored

Value

an object of class 'phylodiv', a named list with slots:

- tree - tips - nodes - hierarchies

taxonomic data

Uses taxizedb internally

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
library(ape)
data(chiroptera)
st <- ape::subtrees(chiroptera)[[393]]
(x <- pd_read(st))
(res <- pd_taxa(x))
res$trees
res$trees[[1]]$hierarchies
res$fetch_hierarchies()

## End(Not run)

ropensci/phylodiv documentation built on March 13, 2020, 3:14 p.m.