View source: R/updateTreeList.R
updateTreeList | R Documentation |
internal Phylofactor function - splits the tree corresponding to the split bin
updateTreeList(treeList, binList, grp, tree, skip.check = F)
treeList |
list of trees |
binList |
list of bins corresponding to treeList |
grp |
two-element list corresponding to the splitting of an bin |
tree |
phylo class object |
skip.check |
Logical whether to skip checking if we grabbed the correct tree. |
library(ape)
set.seed(6)
tree <- rtree(10)
Groups <- getPhyloGroups(tree)
treeList <- list(tree)
binList <- list(1:10)
factor <- 2
grp <- getLabelledGrp(factor,tree,Groups)
grp
lapply(grp,FUN=function(g,tree){tree$tip.label[g]},tree=tree)
node=17
treeList <- updateTreeList(treeList,binList,grp,tree)
par(mfrow=c(1,3))
plot.phylo(tree,main='Original Tree',cex=2)
edgelabels('SPLIT',factor,bg='red',cex=2)
plot.phylo(treeList[[1]],main='First Bin Tree',cex=2)
plot.phylo(treeList[[2]],main='Second Bin Tree',cex=2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.