ancestral reconstruction for discrete trait:
I have a list of trees. I am trying to map trait on these trees and summarize them on a consensus tree.
I am using "make.simmap" in phytools pakage.
I am trying to analyze step by step from this link "http://blog.phytools.org/2013/04/using-makesimmap-on-set-of-trees.html". Unfortunately I have an error and could not to debug it. please help me!
this is my command and error:
first load packages
require(phytools) trees<-read.nexus("D:\project\PhD\fullrun1.nex") trees trees<-sample(trees[8751:35001],5) trees
readdata
x<-read.csv("D:\project\PhD\fullrun1.csv") mtrees<-make.simmap(trees,x,nsim=10,message=FALSE)
Error in [.data.frame
(x, order(x, na.last = na.last, decreasing = decreasing)) :
undefined columns selected