install.packages('ape', repos='http://cran.wustl.edu/') install.packages('seqinr', repos='http://cran.wustl.edu/') library(ape) library(seqinr) data <- read.table('Salmon_data.txt', header=TRUE) newick <- read.tree('Salmon.nwk') x<- data$body_length names(x)<- data$species y<-data$Egg_weight names(y)<- data$species cor(pic(x, newick), pic(y, newick))