Root1
non-interactively reroots a phylogenetic tree with respect
to the specified outgroup even if it is not monophyletic.
Root1(phy, outgroup, select=1, ...)
An object of class "phylo"
.
A vector of mode numeric or character specifying the new outgroup.
Which element of outgroup to select if it is not monophyletic.
Arguments passed to ape::root().
An object of class "phylo"
This is a wrapper of ape::root() to use in non-interactive mode. If specified outgroup is not monophyletic, instead of error, it issues error _message_, and chooses the 'select' element as a new outgroup.
ape::root
# NOT RUN {
data(bird.orders, package="ape")
ape::root(bird.orders, 1:2)
## ape::root(bird.orders, 1:3) # gives error
Root1(bird.orders, 1:3) # only outputs error _message_
Root1(bird.orders, 1, resolve.root=TRUE)
# }
Run the code above in your browser using DataLab