我需要一个非常简单的循环,从 multiphylo 对象中获取每个系统发育树,并计算每棵树的 Ic 并将其放入数据框中。对不起,如果它这么简单,我是 R 新手,我想不通!
library(apTreeshape)
library(phytools)
multi_trees<- pbtree(b=0.5, d=0, n=200, t=NULL, scale=NULL,
nsim=50, type="continuous", extant.only=TRUE) ### simulate 50 trees stored as multiphylo object
converted_tree <- as.treeshape(multi_trees[[nsim=1]]) ## each tree need to be converted to class treeshapes using following function
Ic <- colless(converted_tree, norm = NULL) #And finally calculate Ic for each tree