Run a function on a treedata.table object

tdt(tdObject, ...)

Arguments

tdObject

A treedata.table object

...

A function call.

Value

Function output for a single tree (phylo) or a list of function outputs (one per each tree in the MultiPhylo object)

Details

This function allows R functions that use trees and data to be run ontreedata.table objects.

Examples

data(anolis) if (FALSE) { # A treedata.table object with a phylo $phy td <- as.treedata.table(anolis$phy, anolis$dat) tdt(td, geiger::fitContinuous(phy, extractVector(td, "SVL"), model = "BM", ncores = 1 )) tdt(td, phytools::phenogram(phy, extractVector(td, "SVL"), quiet = TRUE, spread.labels = FALSE )) # A treedata.table object with a multiPhylo $phy treesFM <- list(anolis$phy, anolis$phy) class(treesFM) <- "multiPhylo" td <- as.treedata.table(treesFM, anolis$dat) tdt(td, geiger::fitContinuous(phy, extractVector(td, "SVL"), model = "BM", ncores = 1 )) tdt(td, phytools::phenogram(phy, extractVector(td, "SVL"), quiet = TRUE, spread.labels = FALSE )) }