scale_phylo: Rescale a Phylogenetic tree

View source: R/manipulate_phylo.R

scale_phyloR Documentation

Rescale a Phylogenetic tree

Description

Rescale branch lengths for a phylo object to fix the maximum distance from the root to tip of a phylogenetic tree.

Usage

scale_phylo(phy, max_dist = 1)

Arguments

phy

An object of class "phylo".

max_dist

A positive, real scalar. The maximum distance along the rescaled phylogeny from root to tip.

Value

An object of class "phylo" where the maximum distance from the root to tip is max_dist

Examples

tr <- ape::rtree(100)
tr1 <- scale_phylo(tr)

jpmeagher/vbar documentation built on Nov. 22, 2022, 5:48 a.m.