treedata.table (version 0.1.0)

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

Description

Returning a named vector from a treedata.table object

Usage

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

Run this code
# NOT RUN {
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")
# }

Run the code above in your browser using DataLab