# Birth-death tree with extinct taxa
p2<-birthdeath.tree(b=0.2, d=0.1, time.stop=30)
plot(p2)
# Previous tree with extinct taxa removed
prune.extinct.taxa(p2)->p3
if(!is.null(p3)) plot(p3)
p4<-birthdeath.tree(b=0.2, d=0, taxa.stop=100)
p5<-prune.random.taxa(p4, 40)
plot(p5)
Run the code above in your browser using DataLab