Description Usage Arguments Details Examples
View source: R/treeplyr_functions.R
Apply a function over all treedata object columns and return a list of results, analogously to the normal apply function
1 |
tdObject |
A treedata object |
MARGIN |
the margin over which the data is applied (e.g. 1 = rows, 2 = columns) |
FUN |
A function to apply over the data frame |
... |
Additional parameters passed on to FUN |
Note that if the parameter phy
is specified in the additional parameters (i.e. '...'),
then it will be substituted with the treedata
object $phy
.
1 2 3 | data(anolis)
td <- make.treedata(anolis$phy, anolis$dat)
td %>% forceNumeric(.) %>% tdapply(., 2, phytools::phylosig, tree=phy)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.