title: find the minimum number of internal nodes of my unrooted tree in R
body: <p>I am using the <code>ape</code> package in <code>R</code> to make a phylogeny. </p>
  
  <pre><code>tree1 &lt;-read.nexus("my_unrooted_tree.nex", tree.names = NULL)
  </code></pre>
  
  <p>I want to find the minimum number of internal nodes of my unrooted tree. </p>
  
  <p>Using <code>tree1$edge</code> I can could the number of ancestoral branches, but is there a way to do this automatically? </p>