This file contains 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
toNum <- function(x){ | |
for (i in 1:length(x)){ | |
matrix <- as.matrix(x) | |
x[,i] <- as.numeric(matrix[,i]) | |
} | |
} | |
#At the end, all characters in the data frame will be numeric type variables. |
This file contains 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
#How to download sequences from GenBank | |
# | |
#[email protected] | |
####################################################################################### | |
# Use a data without NA # | |
# # | |
#This function need a data frame with the two first columns calling Genera and Specie # | |
# # | |
####################################################################################### |
This file contains 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) | |
library(phangorn) | |
##This is the tree who I'll want to calculate Vane-Wright index | |
## | |
tree <- read.tree("puranius.tre") | |
plot(tree) | |
##Now a read the table | |
##This table have terminal and the number of nodes who belong each terminal |