title: How to get correct order of tip labels in APE after calling ladderize function
body: <p>I'm trying to order the rows of a dataframe based on the tip labels found in a phylogenetic tree. The way I was going to do this was to use the <code>match</code> function similar to the answer from <a href="https://stackoverflow.com/questions/11977102/order-a-data-frames-rows-according-to-a-target-vector-that-specifies-the-desire">this question</a>, however I'm stuck cause the <code>tip.label</code> property of the <code>ape</code> phylo object doesn't change if you reorder the nodes using the <code>ladderize</code> function.</p>
  
  <pre><code>library(ape)
  tree &lt;- read.tree(text = "(((A,B),(C,D)),E);")
  tree2 &lt;- ladderize(tree, right = FALSE)
  tree$tip.label
  #&gt; [1] "A" "B" "C" "D" "E"
  tree2$tip.label
  #&gt; [1] "A" "B" "C" "D" "E"
  </code></pre>
  
  <p>Notice that the order of the <code>tip.label</code> hasn't changed even though the visual representation of the tree does. In this simple example the visual order of the tree after the <code>ladderize</code> function is <code>E A B C D</code> (reading from bottom to top on the tree after plotting). How can I get a copy of the <code>tip.label</code> vector where the order reflects the new order of the nodes in the tree? </p>