data(plethspecies)
Y.gpa<-gpagen(plethspecies$land) #GPA-alignment
gp.end<-factor(c(0,0,1,0,0,1,1,0,0)) #endangered species vs. rest
names(gp.end)<-plethspecies$phy$tip
#Calculate rates of shape
compare.evol.rates(plethspecies$phy,Y.gpa$coords,gp=gp.end,iter=49)
#Calculate rates of size
Csize <- matrix(Y.gpa$Csize, dimnames=list(names(Y.gpa$Csize))) # make matrix Csize with names
compare.evol.rates(plethspecies$phy,Csize,gp=gp.end,iter=49)
Run the code above in your browser using DataLab