Closed avvypaks closed 3 years ago
Hi @avvypaks. My guess is that the input data are not being treated as a factor -- so levels(feed.mode)
is nonsensical. Try running feed.mode<-as.factor(feed.mode)
and then the rest as written & see if that solves your problem.
Hi, I am using "http://www.phytools.org/Cordoba2017/ex/8/Anc-states-discrete.html" this script for ancestral state estimation using phytools. Now, even with the sample files, I am getting error:
Error in
[<-
(*tmp*
, x == seq[i], i, value = 1) : subscript out of boundsin the code : tiplabels(pie=to.matrix(feed.mode[eel.tree$tip.label], levels(feed.mode)),piecol=cols,cex=0.3)
Can you help me with this error?