Scale by a scalar factor all the edges ($edge.length) of a phylo object from the ape package, including the root edge ($root.edge) if present, and additive edges ($edge.length.add, present in trees returned by fit_tree()).
Stops if any of the edges exceed 1 before or after scaling (since these edges are IBD probabilities).
Usage
scale_tree(tree, factor)
Arguments
tree
The coancestry tree to edit.
factor
The scalar factor to multiply all edges.
Must be non-negative, and not be so large that any edge exceeds 1 after scaling.
Value
The edited tree with all edges scaled as desired.
See Also
ape::read.tree() for reading phylo objects and their definition.