Learn R Programming

paleotree (version 1.0)

taxa2phylo: Convert taxon data into Phylogeny

Description

Convert temporal and ancestor-descendant relationships of taxa into a time-scaled phylogeny

Usage

taxa2phylo(taxad, obs_time = NULL, plot = F)

Arguments

taxad
A five-column matrix of taxonomic data, as output by simFossilTaxa
obs_time
Per-taxon times of observation; if NULL, the LADs (column 4) in taxad2 are used
plot
Plot the resulting phylogeny?

Value

  • The resulting phylogeny with branch lengths is output as an object of class phylo

Details

This function will output trees with the element $root.time, which is the time of the root divergence in absolute time. As with many functions in the paleotree library, absolute time is always decreasing, i.e. the present day is zero. Please, DON'T use this function to time-scale a real tree. It assumes you know the use timePaleoPhy or srcTimePaleoPhy instead. Please, DO use this function when doing simulations and you want to make a tree of the 'true' history, such as for simulating trait evolution along phylogenetic branches.

See Also

simFossilTaxa,taxa2cladogram,

Examples

Run this code
set.seed(444)
taxa<-simFossilTaxa(p=0.1,q=0.1,nruns=1,mintaxa=20,maxtaxa=30,maxtime=1000,nExtant=0)
#let's use taxa2cladogram() to get the 'ideal' cladogram of the taxa
tree<-taxa2phylo(taxa)
phyloDiv(tree)
#now a phylogeny with tips placed at the apparent time of extinction
rangesCont<-sampleRanges(taxa,r=0.5)
tree<-taxa2phylo(taxa,obs_time=rangesCont[,2])
phyloDiv(tree)

Run the code above in your browser using DataLab