Description Usage Arguments Details References Examples
Return a dataframe of edge number and a count based on the number descendents within n.intervals uniformly spaced time intervals.
1 | calcEdgeDiversity(tree, n.intervals)
|
tree |
phylogenetic tree (ape class) |
n.intervals |
number of intervals |
Intervals are unifromely spaced from the root to the tip of the tree. Output can be provided to treeplot for colouring edges, see example.
No references yet! https://github.com/DomBennett/MoreTreeTools.
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')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.