Rev Language Reference


taxon - Taxon object

The taxon function creates a Taxon object.

Usage

taxon(String taxonName, String speciesName, RealPos age/min, RealPos max)

Arguments

taxonName : String (pass by value)
The name of the taxon.
speciesName : String (pass by value)
The name of the species it belongs to.
Default : taxonName
age/min : RealPos (pass by value)
The (minimum) age before the present when this taxon was sampled.
Default : 0
max : RealPos (pass by value)
The maximum age before the present when this taxon was sampled.
Default : age/min

Details

Each Taxon object records that taxon's name in addition to other information, such as age (which is non-zero for fossils). Character matrices and trees contain Taxon vectors (Taxon[]) that are used to match leaf nodes to data entries for phylogenetic analyses. For multispecies coalescent analyses, Taxon objects are also used to assign species memberships to individuals.

Example

# we can create a Taxon object
taxon_gorilla = taxon("Gorilla_gorilla")
# we can create a dummy vector of Taxon objects for simulation
for (i in 1:10) { taxa[i] = taxon("Taxon"+i) }
phy ~ dnBDP(lambda=1, mu=0, rootAge=1, taxa=taxa)
# retrieve the taxon list for 'phy'
phy.taxa()

Methods

  • getAge()
  • getMaxAge()
  • getMinAge()
  • getName()
  • getSpeciesName()

See Also