[[.treedata.table {treedata.table}R Documentation

Function for extract a named vector from an object of class treedata.table

Description

This function extracts a named vector for any trait from an object of class treedata.table.

Usage

## S3 method for class 'treedata.table'
x[[..., exact = TRUE]]

Arguments

x

An object of class treedata.table

...

Column name in class character

exact

whether exact search should be conducted

Value

A new object of class vector with names set to labels corresponding to tip labels in the provided treedata.table object.

See Also

data.table()

Examples

data(anolis)
# With a phylo object
td <- as.treedata.table(anolis$phy, anolis$dat)
td[["SVL"]]

# With a multiPhylo object
treesFM <- list(anolis$phy, anolis$phy)
class(treesFM) <- "multiPhylo"
td <- as.treedata.table(treesFM, anolis$dat)
td[["SVL"]]

[Package treedata.table version 0.1.0 Index]