Description Usage Arguments Details Value Author(s) See Also Examples
This function deletes a node (and its descendant nodes) from the tree.
1 |
inode |
the node to be deleted |
name |
the species names |
nodematrix |
the tree node matrix |
The species names are those defined in the original tree before deleting the node inode. No need to delete the species name of inode! If inode is an internode, the whole subtree below inode will be deleted.
nodes |
the tree node matrix after deleting |
treestr |
the tree string of the tree after deleting |
Liang Liu
1 2 3 4 5 6 7 8 9 10 | treestr<-"((((H:0.00402,C:0.00402):0.00304,G:0.00707):0.00929,O:0.01635):0.1,W:0.12);"
spname<-read.tree.nodes(treestr)$names
nodematrix<-read.tree.nodes(treestr,spname)$nodes
del.node(6,spname,nodematrix)
##unrooted tree
data(unrooted.tree)
name<-paste("S",1:29,sep="")
nodematrix<-read.tree.nodes(unrooted.tree[1])$nodes
del.node(6,name,nodematrix)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.