RescaleTree: Rescale the branches of a phylogeny based on species...

Description Usage Arguments Details Value References See Also

View source: R/RescaleTree.R

Description

Rescales the branches of the tree based on the abundance of all taxa that are descendant from each branch.

Usage

1
RescaleTree(phy, abundance.data, rebuild = TRUE, scaled = FALSE)

Arguments

phy

An object of class phylo

abundance.data

A data frame with two columns. The first should contain species names which exactly match the species name in phy. The second column should be an integer or numeric value representing the abundance each species.

rebuild

A logical indicating whether to rebuild phy if mismatches are found between the species names in abundance.data and the species names in phy or if there are NAs and/or 0s in the abundance column.

scaled

A logical indicating whether to scale relative abundances to values between 0 and 100.

Details

RescaleTree recomputes the length of each branch in the input phylogeny by dividing the length of the input branch by the sum of the abundances of all species that descend from that branch. By default, it will omit any species that have abundance values of 0 or NA, as it would be impossible to calculate the length for their terminal branches.

Value

An object of class phylo

References

Cadotte et al 2010 AED find citation later when you have internet

See Also

drop.tip


levisc8/FocalPhylo documentation built on May 21, 2017, 12:35 p.m.