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")

treedata.table documentation built on Oct. 23, 2020, 5:50 p.m.