birthdeath.tree {geiger} | R Documentation |
Simulates phylogenetic tree under a uniform birth-death process
birthdeath.tree(b, d, time.stop = 0, taxa.stop = 0, seed = 0)
b |
Per-lineage birth (speciation) rate |
d |
Per-lineage death (extinction) rate |
time.stop |
Stopping time |
taxa.stop |
Maximum number of taxa |
seed |
Random number seed; if seed=0 (default) then random number generator is seeded based on the clock |
Phylogenetic tree in ape format
Luke J. Harmon and Jason Wier
Geiger
# Pure-birth tree p1<-birthdeath.tree(b=0.1, d=0, time.stop=20) plot(p1) # Birth-death tree with extinct taxa p2<-birthdeath.tree(b=0.2, d=0.05, time.stop=20) plot(p2) # Previous tree with extinct taxa removed prune.extinct.taxa(p2)->p3 if(!is.null(p3)) plot(p3) else cat("No survivors\n") #Sometimes there are no extant taxa