treedply.treedata: Run a function on a 'treedata' object

View source: R/treeplyr_functions.R

treedplyR Documentation

Run a function on a treedata object

Description

Run a function on a treedata object

Usage

treedply(tdObject, ...)

## S3 method for class 'treedata'
treedply(tdObject, ...)

Arguments

tdObject

A treedata object

...

A function call.

Details

This function allows arbitrary R functions that use trees and data to be run on treedata objects.

Value

Function output

Examples

data(anolis)
td <- make.treedata(anolis$phy, anolis$dat)
treedply(td, geiger::fitContinuous(phy, getVector(td, SVL), model="BM", ncores=1))
treedply(td, phytools::phylosig(phy, getVector(td, awesomeness), "lambda", test=TRUE))
treedply(td, phytools::phenogram(phy, getVector(td, SVL), ftype="off", spread.labels=FALSE))

uyedaj/treeplyr documentation built on March 9, 2023, 6:37 p.m.