set.seed(444)
taxa<-simFossilTaxa(p=0.1,q=0.1,nruns=1,mintaxa=20,maxtaxa=30,maxtime=1000,maxExtant=0)
#let's use taxa2cladogram() to get the 'ideal' cladogram of the taxa
layout(1:2)
cladogram<-taxa2cladogram(taxa,plot=TRUE)
#compare the "real" time-scaled tree of taxon last occurrences (taxa2phylo)
#to the 'ideal' cladogram
tree<-taxa2phylo(taxa,plot=TRUE)
#testing with cryptic speciation
taxaCrypt<-simFossilTaxa(p=0.1,q=0.1,prop.cryptic=0.5,nruns=1,mintaxa=10,maxtaxa=20,
maxtime=1000,maxExtant=0)
layout(1:2);parOrig<-par(mar=c(0,0,0,0))
cladoCrypt1<-taxa2cladogram(taxaCrypt,drop.cryptic=FALSE)
plot(cladoCrypt1)
cladoCrypt2<-taxa2cladogram(taxaCrypt,drop.cryptic=TRUE)
plot(cladoCrypt2)
par(parOrig);layout(1) #reset plotting
Run the code above in your browser using DataLab