ggtree
ggtree copied to clipboard
bug in rotate
Hi,
rotate behaves peculiar, when rotating a node of a tree.
# data from tree book
tree <- read.tree("data/HMP_tree/hmptree.nwk")
p <- ggtree(tree)
p
ggtree::rotate(p, 5)
The branch of node 5 disappears. This is reproducable with layout = "fan"
and all other nodes I have tested.
In addition the man page of rotate
contains an error.
node internal node number to specify a clade. If NULL, using the whole tree
Not defining node
or setting it to NULL
results in an error.
> ggtree::rotate(p)
Error in offspring.tbl_tree(df, node) : .node is required
the node
should be internal node number.
Ah ok. Thanks for the info.
But shouldn't rotation around a tip node result in the same output? Currently the parent node just gets removed/omited