simToPhylo.Rd
Converts the $results element of the return to a phylo object
SimToPhylo(results, include.extinct=FALSE, drop.stem=TRUE)
dataframe of results from SimulateHisse.
include (TRUE) or delete (FALSE) extinct terminal taxa.
include the lineage leading to the first saved speciation even (FALSE) or cull it (TRUE).
This takes the $results
object from a SimulateHisse
run and converts it to an ape phylo
object. If there are no taxa on the final tree, it returns NA; if there is one taxon, it returns a one taxon tree. This is behavior different from diversitree's tree simulators, which returns NULL in both the zero and one taxon case. Extinct taxa can be pruned or not. For simulations starting with one taxon, and/or for simulations with some extinction, the final tree can have a time when there is a single lineage before it radiates into the crown group. This stem can be included or not. The tip states are stored in $tip.state
in the returned tree.
a phylo object in cladewise order.
Beaulieu, J.M, and B.C. O'Meara. 2016. Detecting hidden diversification shifts in models of trait-dependent speciation and extinction. Syst. Biol. 65:583-601.