Learn R Programming

phylosim (version 3.0.5)

getTreeLength.PhyloSim: Get the tree length from a PhyloSim object

Description

Get the tree length from a PhyloSim object.

This method retruns the sum of the edge lengths stored in the aggregated phylo object.

Usage

# S3 method for PhyloSim
getTreeLength(this, ...)

Arguments

this

A PhyloSim object.

...

Not used.

Value

A numeric vector of length one.

See Also

For more information see PhyloSim.

Examples

Run this code
# NOT RUN {
	# create a PhyloSim object
	sim<-PhyloSim(phylo=rcoal(5));
	# get the tree length
	getTreeLength(sim)
	# get tree length via virtual field
	sim$treeLength
 
# }

Run the code above in your browser using DataLab