title: Keeping information of nodes after dropping tips
body: <p>When I have a tree and some node information stored in a table, I would like to drop tips, and modify the table accordingly. So a new table with the correct new number in column node is necessary.</p>
  
  <pre><code>library(ape)
  library(ggtree)
  #make tree
  set.seed(2016-12-31)
  newrtree&lt;-rtree(12)
  newrtreepo&lt;-di2multi(newrtree, tol = 0.5)
  
  # make table with data to plot in tree
  a&lt;-1:newrtreepo$Nnode # node label
  b&lt;-seq(0,1, length.out=newrtreepo$Nnode)
  c&lt;-1-b
  dat &lt;- data.frame(a=a, b=b,c=c)
  splen&lt;-length(newrtreepo$tip.label)
  dat$node &lt;- splen+1:newrtreepo$Nnode
  dat
  #   a         b         c node
  # 1 1 0.0000000 1.0000000   13
  # 2 2 0.1428571 0.8571429   14
  # 3 3 0.2857143 0.7142857   15
  # 4 4 0.4285714 0.5714286   16
  # 5 5 0.5714286 0.4285714   17
  # 6 6 0.7142857 0.2857143   18
  # 7 7 0.8571429 0.1428571   19
  # 8 8 1.0000000 0.0000000   20
  
  tree5&lt;-ggtree(newrtreepo)+geom_tiplab()+
    geom_text2(aes(subset=!isTip, label=node), hjust=-1, check_overlap = T)+
    geom_text2(aes(subset=!isTip,x=branch, label=label, size=2), vjust=-.5, hjust=0.5)
  
  piesa &lt;- nodepie(dat, cols=2:3)
  inset(tree5, piesa)
  
  droptree2&lt;-drop.tip(newrtreepo,c("t12","t3","t5"))
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/X4zL5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/X4zL5.png" alt="enter image description here"></a></p>