Last active
August 1, 2018 04:22
-
-
Save thanhleviet/17c18c1dc0022ea36ae6b62b0f691823 to your computer and use it in GitHub Desktop.
See tips from a tree
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(ape) | |
tree <- rtree(n = 20) | |
plot(tree, edge.width = 2) | |
#By default, tips odered from bottom to top | |
t <- tree$tip.label | |
# Re order from top to bottom | |
rev(tree$tip.label) | |
#Write out to a text file | |
sapply(t, function(x) write(x,"tips.txt", append = T)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment