This is a commonly reported error from the function contMap:
contMap : Error in while (x > trans[i]) { : missed value TRUE / FALSE is required
I believe this is usually due to branches of zero length in the tree. For internal branches of zero length, this can be resolved using:
tree<-di2multi(tree)
Hi Liam,
ReplyDeleteI've been getting this error even after using your suggestion, within the code you posted for multi-plot phylomorphospaces with contMap. Is there anything else that might give me this warning? Admittedly, the tree I'm using has a lot of polytomies, but I don't know if that's an issue.
Thanks,
Kara
Hi Kara. The problem can also be very short edges. You can try collapsing those into polytomies by increasing the value of tol in di2multi. You can also increase res in contMap & this may also address your issue. Feel free to send me your data & code to troubleshoot. All the best, Liam
DeleteThanks, Liam! I'll have a go at it, and let you know if this works.
DeleteThat worked perfectly--I had to change both parameters.
ReplyDeleteJust a note that I got this error for a tree with no ~0 branch lengths, but with data stored as a frame rather than a vector (i.e. as the output from geiger::treedata). I know that's user error, but just figured I'd put it somewhere on the web in case anyone else was getting buggered by this! Also, a big thank you Liam, phytools is making my life much easier right now.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteHi Liam, I did just that, but I was unsuccessful. What do you think about this error? Can you help me, please?A big thank you!
ReplyDelete