calcEdgeDiversity: Calculate the diversity of edges within set time intervals

Description Usage Arguments Details References Examples

Description

Return a dataframe of edge number and a count based on the number descendents within n.intervals uniformly spaced time intervals.

Usage

1
calcEdgeDiversity(tree, n.intervals)

Arguments

tree

phylogenetic tree (ape class)

n.intervals

number of intervals

Details

Intervals are unifromely spaced from the root to the tip of the tree. Output can be provided to treeplot for colouring edges, see example.

References

No references yet! https://github.com/DomBennett/MoreTreeTools.

Examples

1
2
3
4
5
6
tree <- rtree (100)
edge.diversity <- calcEdgeDiversity (tree, n.intervals=4)
# convert to logged z-score to increase colour spectrum in plot
edge.diversity$count <- log (edge.diversity$count)
edge.diversity$col <- (edge.diversity$count - mean (edge.diversity$count)) / sd (edge.diversity$count)
chromatophylo (tree, edge.cols=edge.diversity, legend.title='Diversity')

DomBennett/MoreTreeTools documentation built on May 6, 2019, 2:51 p.m.