Learn R Programming

phylosim (version 3.0.5)

scaleTree.PhyloSim: Scale the branch lengths of a phylo object aggragted by a PhyloSim object

Description

Scale the branch lengths of a phylo object aggragted by a PhyloSim object. This method multiples all the edge lengths by the specified factor.

Usage

# S3 method for PhyloSim
scaleTree(this, factor, ...)

Arguments

this

A PhyloSim object.

factor

A numeric vector of length one.

...

Not used.

Value

The PhyloSim object (invisible).

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
	sim$treeLength
	# scale tree
	scaleTree(sim,10)
	# get the scaled tree length
	sim$treeLength
 
# }

Run the code above in your browser using DataLab