setwd("C:/Users/Heteroediscelis/Google Drive/Fruit Traits") library (phytools) read.nexus("SpeciesNexus2.nex", tree.names = NULL) -> speciesTree speciesTree$edge.length<-rep(1,nrow(speciesTree$edge)) plot(speciesTree, node.pos=1, cex=0.6, label.offset=0.1) read.csv("fruittraits.csv") -> fruits.dat data.frame(fruits.dat[,2:6]) -> fruitData rownames(fruitData) <- fruits.dat[,1] attach(fruitData) names(voc) <- rownames(fruitData) names(uv) <- rownames(fruitData) names(blue) <- rownames(fruitData) names(green) <- rownames(fruitData) names(red) <- rownames(fruitData) phylosig(speciesTree,voc,test=TRUE) phylosig(speciesTree,voc,method="lambda",test=TRUE) phylosig(speciesTree,uv,test=TRUE) phylosig(speciesTree,uv,method="lambda",test=TRUE) phylosig(speciesTree,blue,test=TRUE) phylosig(speciesTree,blue,method="lambda",test=TRUE) phylosig(speciesTree,green,test=TRUE) phylosig(speciesTree,green,method="lambda",test=TRUE) phylosig(speciesTree,red,test=TRUE) phylosig(speciesTree,red,method="lambda",test=TRUE)