change.root: Change tree root

Description Usage Arguments Details Value Author(s) See Also Examples

Description

The function changes the tree root.

Usage

1
change.root(nodematrix, newroot)

Arguments

nodematrix

the tree node matrix

newroot

the node number of the new root

Details

The function always returns an unrooted tree. Use the function link{root.tree} to root the unrooted tree if you need a rooted tree.

Value

nodes

the tree node matrix after changing the tree root

rootnode

the node number of the new root

Author(s)

Liang Liu lliu@uga.edu

See Also

root.tree, rootoftree

Examples

1
2
3
treestr<-"((((H:0.00402,C:0.00402):0.00304,G:0.00707):0.00929,O:0.01635):0.1,W:0.12);"
nodematrix<-read.tree.nodes(treestr)$nodes
change.root(nodematrix,6)

bomeara/phybase documentation built on May 12, 2019, 11:35 p.m.