Description Usage Arguments Details Value Author(s) See Also Examples
This function works exactly in the same manner as rotate
in the ape
package, but in addition can handle non-standard node label elements like those generated by read.beast
.
1 |
phy |
An object of class |
node |
A vector of mode numeric or character specifying the number of the node. |
polytom |
A vector of mode numeric and length two specifying the two clades that should be exchanged in a polytomy. |
Please refer to rotate
.
An object of class "phylo"
.
Christoph Heibl
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | # a phylogeny of wild barley
# --------------------------
data(hordeum)
hordeum$tip.label <- LETTERS[1:20]
# rotate phylogeny at node 27
# ---------------------------
node <- 27
hordeum.rotated <- rotate2(hordeum, node)
# plot ...
par(mfcol = c(1, 2), mar = c(0.5, 0.5, 0.5, 0.5))
# ... unmodified tree and
# -----------------------
plot(hordeum)
nodeInfo(node = node, label = "node to rotate", angle = 160, lex = 8)
node.support(hordeum$posterior, pos = "pretty")
# ... rotated tree
# ----------------
plot(hordeum.rotated, direction = "leftward")
nodeInfo(node = node, label = "rotated node", angle = 340, lex = 6)
node.support(hordeum.rotated$posterior, pos = "pretty")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.