Closed HedvigS closed 1 year ago
Oh, just noticed. phangorn::Descendants() doesn't report node 66. Huh...
I just gotta go type = "all". My bad, all good now for the phangorn funciton.
Sorry that the original code snippet above was a bit messy an inaccurate, I've updated it now.
I think I get it now!! phytools::getDescendants() only operates on one node at a time! And if I give it more than one, it just checks the first one in the list. However, phangorn::Descendants() can do multiple nodes at a time!
Okay, maybe that's super obvious to all other users but it took me a while to get. Haha! Could the documentation maybe be updated? For slow people like me :)?
Dear @HedvigS. Just catching up on this now. I can see that you worked it out. The doc page for getDescendants
says:
node
: an integer specifying a node number in the tree.
I'm glad that you were able to work it out without my feedback.
All the best, Liam
Thanks @liamrevell ! I'm sorry for accidentally making your github issues my rubber duck 🐥.
In case other users are like me, could the documentation say
node: an integer specifying a node number in the tree. (Note: the function only takes one node at a time.)
Hi Liam.
I'm experiencing unexpected behavior from getDescendants, I was wondering if you know what's up. I'm giving it two nodes, and it should find 5 descendants but it only finds 4. I included a demonstration with phangorn::Descendants() which does find all 5.