if(!inherits(try(open(url("http://www.google.com")), silent = TRUE),
"try-error")) {
## Sackin's index of a tree within TreeBASE.
sackin(dbtrees(db="treebase", tree=715, class="treeshape"))
## Colless' index of a tree within Pandit
t <- as.treeshape(dbtrees(db="pandit", tree=1, class="phylo"),model="yule")
colless(t)
## Collects a tree without printings:
t <- as.treeshape(dbtrees(db="pandit", tree=709, class="phylo"),model="yule")
plot(t)
## Collects a list of trees :
trees=trees <-sapply(dbtrees(db="pandit", tree=1:5, class="phylo"),FUN=function(x){as.treeshape(x,model="yule")})
summary(trees[[2]])
## Collects a non-binary tree
phy=as.treeshape(dbtrees(db="pandit", tree=1, class="phylo"),model="yule")
plot(phy)
tree=dbtrees(db="treebase", tree=741, class="treeshape")
tree=dbtrees(db="treebase", tree=741, class="treeshape", model="yule")
plot(tree)
}
Run the code above in your browser using DataLab