Learn R Programming

treedata.table (version 0.1.1)

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

Description

Returning a named vector from a treedata.table object

Usage

extractVector(tdObject, ...)

Value

A named vector or a list of named vectors

Arguments

tdObject

A treedata.table object

...

The name of the column or columns to select.

Examples

Run this code

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