I am currently using R with phangorn and ape to create trees because what I use is binary data. My data is like the one shown in the first figure attached.
What I want to get is trees with information as shown in the second figure attached.
The leafs, as well as all internal nodes(or edges), labelled. The label of internal nodes/edges are the characters/ variable names.
How can I do this? Thanks in advance for the comments.