Description Usage Arguments Details Value Author(s) See Also Examples
calculate the total branch length of a sub-tree under inode
.
1 | subtree.length(inode, nodes, nspecies)
|
inode |
the root node of the sub-tree |
nodes |
the tree node matrix |
nspecies |
the number of species in the tree |
The node matrix is the output of the function read.unrooted.nodes or read.rooted.nodes. The function can calculate the total branch length of a tree if inode is set to be the root node. If inode is not the root node, subtree.length calculates the total branch length of a sub-tree.
The function returns the total branch length of a sub-tree.
Liang Liu lliu@uga.edu
1 2 3 | tree.string<-"(((H:4.2,C:4.2):3.1,G:7.3):6.3,O:13.5);"
nodes<-read.tree.nodes(tree.string)$nodes
subtree.length(6,nodes,4)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.