0

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
4

1 に答える 1