library(rgl)
data(Laurasiatherian)
set.seed(1)
bs <- bootstrap.phyDat(Laurasiatherian, FUN = function(x)nj(dist.hamming(x)), bs=100, multicore=FALSE)
class(bs) <- 'multiPhylo'
cnet = consensusNet(bs, .3)
plot(cnet, show.edge.label=TRUE)
open3d()
plot(cnet, show.tip.label=FALSE, show.nodes=TRUE)
#plot(cnet, type = "2D", show.edge.label=TRUE)
set.seed(1)
tree1 = rtree(20, rooted=FALSE)
sp = as.splits(rNNI(tree1, n=10))
net = as.networx(sp)
open3d()
plot(net)
Run the code above in your browser using DataLab