setPD: Set the phylogenetic diversity

Description Usage Arguments Details See Also Examples

View source: R/set-methods.R

Description

Return a tree with the phylogenetic diversity altered.

Usage

1
setPD(tree, val)

Arguments

tree

TreeMan object

val

new phylogenetic diversity

Details

Use this function to convert the phylogenetic diversity of a tree. For example, you might want to convert the tree so the sum of all branches is 1. This function will achieve that by modiyfing every branch, while maintaining their relative lengths.

See Also

setAge https://github.com/DomBennett/treeman/wiki/set-methods

Examples

1
2
3
4
library(treeman)
tree <- randTree(10)
tree <- setPD(tree, val=1)
summary(tree)

treeman documentation built on July 8, 2020, 7:28 p.m.