extractVector: Returning a named vector from a treedata.table object

Description Usage Arguments Value Examples

View source: R/extractVector.R

Description

Returning a named vector from a treedata.table object

Usage

1
extractVector(tdObject, ...)

Arguments

tdObject

A treedata.table object

...

The name of the column or columns to select.

Value

A named vector or a list of named vectors

Examples

1
2
3
4
5
6
data(anolis)
td <- as.treedata.table(tree = anolis$phy, data = anolis$dat)
# extracts the named vector for SVL from the td object
extractVector(td, "SVL")
# extracts the named vector for SVL and ecomorph from the td object
extractVector(td, "SVL", "ecomorph")

ropensci/treedata.table documentation built on Sept. 12, 2021, 6:23 p.m.