Created
August 10, 2015 16:13
-
-
Save dwinter/0a72f8b23922bc9d9218 to your computer and use it in GitHub Desktop.
Flag phylogeny
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
traits <- read.csv("flag_traits.csv") | |
dist_mat <- dist(traits, "manhattan") | |
tr <- ape::nj(dist_mat) | |
plot(tr) | |
##Rooting the tree (arbitrarily) will make a nicer plot | |
#rooted <- ape::root(tr, node=50) | |
#plot(rooted) |
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
koru | star | fern | |
---|---|---|---|
0 | 1 | 0 | |
1 | 1 | 0 | |
0 | 1 | 1 | |
0 | 0 | 1 | |
1 | 0 | 0 | |
1 | 1 | 0 | |
0 | 1 | 1 | |
1 | 0 | 0 | |
0 | 1 | 0 | |
0 | 1 | 0 | |
0 | 0 | 1 | |
0 | 1 | 0 | |
1 | 0 | 0 | |
1 | 1 | 0 | |
0 | 0 | 1 | |
1 | 1 | 0 | |
0 | 1 | 0 | |
1 | 0 | 0 | |
0 | 1 | 1 | |
1 | 0 | 0 | |
1 | 1 | 0 | |
0 | 1 | 0 | |
1 | 1 | 0 | |
1 | 1 | 0 | |
0 | 0 | 0 | |
1 | 0 | 0 | |
0 | 0 | 1 | |
0 | 1 | 0 | |
0 | 1 | 1 | |
0 | 0 | 1 | |
1 | 0 | 0 | |
1 | 1 | 0 | |
1 | 1 | 0 | |
1 | 0 | 0 | |
1 | 0 | 0 | |
1 | 1 | 0 | |
0 | 0 | 1 | |
0 | 0 | 0 | |
0 | 0 | 1 | |
1 | 0 | 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment